彩虹底紋模板:企業(yè)內(nèi)容管理系統(tǒng)流程透視Alfrescoppt課件_第1頁
彩虹底紋模板:企業(yè)內(nèi)容管理系統(tǒng)流程透視Alfrescoppt課件_第2頁
彩虹底紋模板:企業(yè)內(nèi)容管理系統(tǒng)流程透視Alfrescoppt課件_第3頁
彩虹底紋模板:企業(yè)內(nèi)容管理系統(tǒng)流程透視Alfrescoppt課件_第4頁
彩虹底紋模板:企業(yè)內(nèi)容管理系統(tǒng)流程透視Alfrescoppt課件_第5頁
已閱讀5頁,還剩32頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、Alfresco from an agile framework perspectiveJeff PottsjpottsmetaversantAgendaPatterns of Alfresco CustomizationA Tale of Two Frameworks: Surf vs. DjangoHeavy Share Customization: A real-world exampleConclusions & AdvicePATTERNS OF ALFRESCO CUSTOMIZATIONCustom Alfresco PatternsNon-Alfresco framework

2、on top of AlfrescoSurf on top of AlfrescoLight Share CustomizationsHeavy Share CustomizationsPatterns we arent going to talk about:Explorer client customizationsPortal integrationEmbedded AlfrescoSource: thomas hawkNon-Alfresco FrameworkSource: Optaros+Surf on AlfrescoSource: OptarosLight Share Cust

3、omizationsHeavy Share CustomizationsA TALE OF TWO FRAMEWORKSSurf or Something Else?Share is a popular, extensible client with a great UIWhen Share is too much or too far from your business requirementsWhich framework on top of Alfresco?An experimentSource: irargerichA word on agile frameworksAgile f

4、rameworks and scripting languages are very popularExamples: Rails, Grails, Django, Wicket, Symfony, Cake, etc.Productive, fast dev cyclesBuilt-in Bootstrapping, ORM, MVC, tests/fixtures, administrative UIsHundreds available across everylanguage imaginableCan be trendy, like frozen yogurtSource: mswi

5、neCommon requirementsLet content authors create chunks and upload filesChunks and files get tagged and categorizedNot all objects have files-the UI cant freak out when it comes across content-less objectsFront-end web site needs to be able to query for chunks, files, and content-less objectsThe fron

6、t-end web site cannot look like ShareOur users arent teamsThey dont care about “document librariesA simple example: To DoBasic requirementsEnd users create/manage to do list itemsTo do list items are taggedEnd users can upload documents related to To DosExtended requirementsCertain categories of To

7、Do Lists have associated content chunks that need to be displayed.Example: To do list that is categorized as Writing should display with content chunks that give advice on writing.Groupings of To Do listsFriends/Co-workersProjects, etc.RSS feedsApproachesTo Dos, Users, and Files are objects.Ill map

8、URLs to various views on those objects.Ill probably use a relational database to persist everything 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 re

9、late To Dos to files.Ill map URLs to various views which will request data from the repository via REST.Five-minute look at DjangoCreating a new Django appDefining a content modelCreating a templateModel View ControllerUsing the admin site to edit object instancesSource: William GottliebFun Django F

10、acts:Started as an internal project in 2003 at the Journal-World newspaper (Lawrence, KS)Named after jazz guitarist, Django ReinhardtThe Onion recently migrated to Django from DrupalModelfrom django.db import modelsfrom django.contrib.auth.models import Userfrom datetime import date, datetimeclass T

11、oDoItem(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.ForeignKey(Use

12、r, 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) toDoItems = models.

13、ManyToManyField(ToDoItem) def _unicode_(self): return models.pyURLs map to Viewsurlpatterns = patterns(, (radmin/, include(admin.site.urls), (r$, main_page), (ruser/(w+)/$, user_page), (rlogin/$, django.contrib.auth.views.login), (rlogout/$, logout_page), (rregister/$, register_page), (rregister/suc

14、cess/$, 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_page), (rtag/$, tag_cloud_page),)settings.pydef user_page(request,

15、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, show_edit: username = request.user.username, ) return render_to_respo

16、nse( user_page.html, variables )views.py Django To Dos | % block title % endblock % home % if user.is_authenticated % welcome, user.username ! | new to do | logout % else % login register % endif % % block head % endblock % % block content % endblock % base.html% extends base.html % block title % us

17、ername % 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_edit % todo_list.htmlTemplate InheritanceAlfresco approachContent Consumer UICustom Surf pages/templates/compone

18、nts for the front-end user interfaceAdministrative UILightly-customized Alfresco ShareData PersistenceCustom content model for properties, associations (To Do data list happens to already exist)Document library for files and content chunksData List objects for To Do itemsRule on a folder to add tagg

19、able and classifiable aspects to new objectsAlfresco approachBusiness LogicShare web scripts to generate UI and handle form postsRepo web scripts to handle JSON POSTs that create new data (file upload, new to do)Repo web scripts to handle GETs that retrieve existing data (chunks for a given category

20、, to do list info)JavaScript for all web-tier and repo-tier web script controllers (fast dev, cuts down on restarts)Demo: A tale of two frameworksShare siteData list content modelSurf pages & web scripts (XML, FreeMarker, JavaScript)Repository web scripts (minimal)Surf configAlfresco user factorySha

21、re config (minimal)RDB back-endSchema managed by DjangoPython classesModelControllers (“Views)FormsURL mappingAdmin UIWork RemainingAdd file upload to both Django and Alfresco To DosDjango has a File typeDjango supports custom File Managers (Hello, CMIS!)Refactor django-alfresco to use CMIS; e.g., C

22、misDocument typeAdd “categorizable chunk to bothSearchFriends listSource: jphilipgComparisonBoth have decent toolingpydev for DjangoEclipse/STS, Roo, Maven, Ant for AlfrescoModel, forms, query much easier in Django“Learning where stuff goesMuch faster in DjangoSurf documentation is “still evolvingSo

23、urce: TheBusyBrainTo Do Demo AppAlfrescoDjangoNumber of files7523Alfresco # of Files by TypeDjango # of Files by TypeComparison (contd)GotchasLack of query-able associations in DM repo was painfulAdd user to Share site on user registration postCreate a rule on the data list folder to set ownerKeep t

24、rack of assignee add/removeAttempt to simplify actually made Surf site harderForms without JavaScriptNo pickersNot fully leveraging Alfrescos form serviceSource: automaniaTo Do DemoAlfrescoDjangoLines of Code1,578674Alfresco LOC by TypeDjango LOC by TypeHEAVY SHARE CUSTOMIZATIONA real-world exampleS

25、aaS platform wants a community site with resources their customers need to leverage the platform betterContent chunks & filesDiscussion threads, blogsEverything tagged against multiple taxonomiesConsumer UIContent Management / Admin UIArchitectureLightly customized ShareAdmin UIConsumer UIHeavily cu

26、stomized ShareContent ModelBehaviorsRulesWeb ScriptsThemeYUIForm ServiceWeb ScriptsContent ManagersCommunity UsersData 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 State Data ListUser-uploaded ContentShare Site HierarchyAdmin DataTeam Data ListContent Consumer UIContent ChunksFile ResourcesAdministrative UICustomization by the Numberst = 17,153 linest

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論