版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、Alfresco from an agile framework perspectiveJeff Potts Copyright 2010, Metaversant Group, Inc. | 2Agenda Patterns of Alfresco Customization A Tale of Two Frameworks: Surf vs. Django Heavy Share Customization: A real-world example Conclusions & Advice3PATTERNS OF ALFRESCO CUSTOMIZATION Copyright
2、2010, Metaversant Group, Inc. | 4Custom Alfresco Patterns Non-Alfresco framework on top of Alfresco Surf on top of Alfresco Light Share Customizations Heavy Share CustomizationsPatterns we arent going to talk about: Explorer client customizations Portal integration Embedded AlfrescoSource: thomas ha
3、wk Copyright 2010, Metaversant Group, Inc. | 5Non-Alfresco FrameworkSource: Optaros+ Copyright 2010, Metaversant Group, Inc. | 6Surf on AlfrescoSource: Optaros Copyright 2010, Metaversant Group, Inc. | 7Light Share Customizations Copyright 2010, Metaversant Group, Inc. | 8Heavy Share Customizations9
4、A TALE OF TWO FRAMEWORKS Copyright 2010, Metaversant Group, Inc. | 10Surf or Something Else? Share is a popular, extensible client with a great UI When Share is too much or too far from your business requirements Which framework on top of Alfresco? An experimentSource: irargerich Copyright 2010, Met
5、aversant Group, Inc. | 11A word on agile frameworks Agile frameworks and scripting languages are very popular Examples: Rails, Grails, Django, Wicket, Symfony, Cake, etc. Productive, fast dev cycles Built-in Bootstrapping, ORM, MVC, tests/fixtures, administrative UIs Hundreds available across everyl
6、anguage imaginable Can be trendy, like frozen yogurtSource: mswine Copyright 2010, Metaversant Group, Inc. | 12Common requirements Let content authors create chunks and upload files Chunks and files get tagged and categorized Not all objects have UI cant freak out when it comes across content-less o
7、bjects Front-end web site needs to be able to query for chunks, files, and content-less objects The front-end web site cannot look like Share Our users arent teams They dont care about “document libraries” Copyright 2010, Metaversant Group, Inc. | 13A simple example: To DoBasic requirements End user
8、s create/manage to do list items To do list items are tagged End users can upload documents related to To DosExtended requirements Certain categories of To Do Lists have associated content chunks that need to be displayed. Example: To do list that is categorized as Writing should display with conten
9、t chunks that give advice on writing. Groupings of To Do lists Friends/Co-workers Projects, etc. RSS feeds Copyright 2010, Metaversant Group, Inc. | 14Approaches To Dos, Users, and Files are objects. Ill map URLs to various views on those objects. Ill probably use a relational database to persist ev
10、erything except the files, which Ill let my framework handle. Files are documents. Thats easy. To Dos are “content-less” objects. I need to figure out a folder for all of this stuff to live in and how I want to relate To Dos to files. Ill map URLs to various views which will request data from the re
11、pository via REST. Copyright 2010, Metaversant Group, Inc. | 15Five-minute look at Django Creating a new Django app Defining a content model Creating a template Model View Controller Using the admin site to edit object instancesSource: William GottliebFun Django Facts: Started as an internal project
12、 in 2003 at the Journal-World newspaper (Lawrence, KS) Named after jazz guitarist, Django Reinhardt The Onion recently migrated to Django from Drupal Copyright 2010, Metaversant Group, Inc. | 16Modelfrom django.db import modelsfrom django.contrib.auth.models import Userfrom datetime import date, dat
13、etimeclass ToDoItem(models.Model): title = models.CharField(max_length=200) dueDate = models.DateField(default=date.today() priority = models.IntegerField(default=3) status = models.TextField() notes = models.TextField() createdDate = models.DateTimeField(default=datetime.today() creator = models.Fo
14、reignKey(User, related_name=todo_creator) assignee = models.ForeignKey(User, null=True, blank=True, related_name=todo_assignee) #attachments = Document # Array of CMIS documents def _unicode_(self): return self.titleclass Tag(models.Model): name = models.CharField(max_length=64, unique=True) toDoIte
15、ms = models.ManyToManyField(ToDoItem) def _unicode_(self): return models.py Copyright 2010, Metaversant Group, Inc. | 17URLs map to Viewsurlpatterns = patterns(, (radmin/, include(admin.site.urls), (r$, main_page), (ruser/(w+)/$, user_page), (rlogin/$, django.contrib.auth.views.login), (rlo
16、gout/$, logout_page), (rregister/$, register_page), (rregister/success/$, direct_to_template, template: registration/register_success.html), (rcreate/$, todo_create_page), (rsave/(d+)/$, todo_save_page), (rsite_media/(?P.*)$, django.views.static.serve, document_root: site_media), (rtag/(s+)/$, tag_p
17、age), (rtag/$, tag_cloud_page),)settings.pydef user_page(request, username): user = get_object_or_404(User, username=username) todos = user.todo_assignee.order_by(-id) variables = RequestContext(request, username: username, todos: todos, show_tags: True, show_assignee: False, show_creator: True, sho
18、w_edit: username = request.user.username, ) return render_to_response( user_page.html, variables )views.py Copyright 2010, Metaversant Group, Inc. | 18 Django To Dos | % block title % endblock % home % if user.is_authenticated % welcome, user.username ! | new to do | logout % else % login register %
19、 endif % % block head % endblock % % block content % endblock % base.html% extends base.html % block title % username % endblock % block head %To Dos for username % endblock % block content % % include todo_list.html % endblock %user_page.html% if todos % % for todo in todos % todo.title % if show_e
20、dit % todo_list.htmlTemplate Inheritance Copyright 2010, Metaversant Group, Inc. | 19Alfresco approach Content Consumer UI Custom Surf pages/templates/components for the front-end user interface Administrative UI Lightly-customized Alfresco Share Data Persistence Custom content model for properties,
21、 associations (To Do data list happens to already exist) Document library for files and content chunks Data List objects for To Do items Rule on a folder to add taggable and classifiable aspects to new objects Copyright 2010, Metaversant Group, Inc. | 20Alfresco approach Business Logic Share web scr
22、ipts to generate UI and handle form posts Repo web scripts to handle JSON POSTs that create new data (, new to do) Repo web scripts to handle GETs that retrieve existing data (chunks for a given category, to do list info) JavaScript for all web-tier and repo-tier web script controllers (fast dev, cu
23、ts down on restarts) Copyright 2010, Metaversant Group, Inc. | 21Demo: A tale of two frameworks Share site Data list content model Surf pages & web scripts (XML, FreeMarker, JavaScript) Repository web scripts (minimal) Surf config Alfresco user factory Share config (minimal) RDB back-end Schema
24、managed by Django Python classes Model Controllers (“Views”) Forms URL mapping Admin UI Copyright 2010, Metaversant Group, Inc. | 22Work Remaining Add to both Django and Alfresco To Dos Django has a Django supports custom (Hello, CMIS!) Refactor django-alfresco to use CMIS; e.g., CmisDocument type A
25、dd “categorizable chunk” to both Search Friends listSource: jphilipg Copyright 2010, Metaversant Group, Inc. | 23Comparison Both have decent tooling pydev for Django Eclipse/STS, Roo, Maven, Ant for Alfresco Model, forms, query much easier in Django “Learning where stuff goes” Much faster in Django
26、Surf documentation is “still evolving”Source: TheBusyBrainTo Do Demo AppAlfrescoDjangoNumber of files7523Alfresco # of Files by TypeDjango # of Files by Type Copyright 2010, Metaversant Group, Inc. | 24Comparison (contd) Gotchas Lack of query-able associations in DM repo was painful Add user to Shar
27、e site on user registration post Create a rule on the data list folder to set owner Keep track of assignee add/remove Attempt to simplify actually made Surf site harder Forms without JavaScript No pickers Not fully leveraging Alfrescos form serviceSource: automaniaTo Do DemoAlfrescoDjangoLines of Co
28、de1,578674Alfresco LOC by TypeDjango LOC by Type25HEAVY SHARE CUSTOMIZATION Copyright 2010, Metaversant Group, Inc. | 26A real-world exampleSaaS platform wants a community site with resources their customers need to leverage the platform betterContent chunks & filesDiscussion threads, blogsEvery
29、thing tagged against multiple taxonomiesConsumer UIContent Management / Admin UI Copyright 2010, Metaversant Group, Inc. | 27ArchitectureLightly customized ShareAdmin UIConsumer UIHeavily customized ShareContent ModelBehaviorsRulesWeb ScriptsThemeYUIForm ServiceWeb ScriptsContent ManagersCommunity U
30、sers Copyright 2010, Metaversant Group, Inc. | 28Data ModelGlobal Share SiteClient Share SitesProject Share SitesUsers & GroupsClient ID on cm:userOne group per clientClient Data ListSnippets & ResourcesCategoriesCategories for products, topics, processesProject Data ListClient LogosProcess
31、State Data ListUser-uploaded ContentShare Site HierarchyAdmin DataTeam Data List Copyright 2010, Metaversant Group, Inc. | 29Content Consumer UI Copyright 2010, Metaversant Group, Inc. | 30Content Chunks Copyright 2010, Metaversant Group, Inc. | 31 Copyright 2010, Metaversant Group, Inc. | 32 Copyright 2010, Metaversant Group, Inc. | 33Administrat
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年度農(nóng)田水利EPC施工合同
- 2024年度體育賽事贊助與媒體轉(zhuǎn)播合同
- 金色魚鉤課件教學(xué)課件
- 2024年度定制家具制作與銷售合同
- 2024年國際貨物買賣與運輸服務(wù)合同
- 2024年度版權(quán)衍生品開發(fā)合同
- 2024年度商用門安裝合同樣本
- 2024年度設(shè)備租賃服務(wù)合同
- 2024江蘇省建設(shè)工程造價咨詢?nèi)^程合同模板
- 2024年度學(xué)校實驗室燈具更換勞務(wù)外包合同
- 第15課 兩次鴉片戰(zhàn)爭 教學(xué)設(shè)計 高中歷史統(tǒng)編版(2019)必修中外歷史綱要上冊+
- 銀行客戶經(jīng)理招聘面試題與參考回答(某大型集團公司)
- 2024-2025學(xué)年度第一學(xué)期七年級語文課內(nèi)閱讀練習(xí)含答案
- 福建省2025屆普通高中學(xué)業(yè)水平合格考試仿真模擬政治試題(一)
- 幼兒園三年發(fā)展規(guī)劃(2024年-2026年)
- 2024-2030年中國重癥監(jiān)護監(jiān)護系統(tǒng)行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略分析報告
- 2024年艾滋病知識題庫
- 2024年安徽龍亢控股集團限公司公開招聘人員13人(高頻重點提升專題訓(xùn)練)共500題附帶答案詳解
- 湖南美術(shù)出版社六年級上冊《書法練習(xí)指導(dǎo)》表格教案
- 投標項目進度計劃
- 中醫(yī)腦病科缺血性中風(腦梗死恢復(fù)期)中醫(yī)診療方案臨床療效分析總結(jié)
評論
0/150
提交評論