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

下載本文檔

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

文檔簡介

AlfrescofromanagileframeworkperspectiveJeffPottsjpotts@AgendaPatternsofAlfrescoCustomizationATaleofTwoFrameworks:Surfvs.DjangoHeavyShareCustomization:Areal-worldexampleConclusions&AdvicePATTERNSOFALFRESCOCUSTOMIZATIONCustomAlfrescoPatternsNon-AlfrescoframeworkontopofAlfrescoSurfontopofAlfrescoLightShareCustomizationsHeavyShareCustomizationsPatternswearen’tgoingtotalkabout:ExplorerclientcustomizationsPortalintegrationEmbeddedAlfrescoSource:thomashawkNon-AlfrescoFrameworkSource:Optaros+SurfonAlfrescoSource:OptarosLightShareCustomizationsHeavyShareCustomizationsATALEOFTWOFRAMEWORKSSurforSomethingElse?Shareisapopular,extensibleclientwithagreatUIWhenShareistoomuchortoofarfromyourbusinessrequirements…WhichframeworkontopofAlfresco?Anexperiment…Source:irargerichAwordonagileframeworksAgileframeworksandscriptinglanguagesareverypopularExamples:Rails,Grails,Django,Wicket,Symfony,Cake,etc.Productive,fastdevcyclesBuilt-inBootstrapping,ORM,MVC,tests/fixtures,administrativeUI’sHundredsavailableacrosseverylanguageimaginableCanbetrendy,likefrozenyogurtSource:mswineCommonrequirementsLetcontentauthorscreate"chunks"anduploadfilesChunksandfilesgettaggedandcategorizedNotallobjectshavefiles--theUIcan'tfreakoutwhenitcomesacross"content-less"objectsFront-endwebsiteneedstobeabletoqueryforchunks,files,andcontent-lessobjectsThefront-endwebsitecannotlooklikeShareOurusersaren'tteamsTheydon'tcareabout““documentlibraries”Asimpleexample:ToDoBasicrequirementsEnduserscreate/managetodolistitemsTodolistitemsaretaggedEnduserscanuploaddocumentsrelatedtoToDo’sExtendedrequirementsCertaincategoriesofToDoListshaveassociatedcontentchunksthatneedtobedisplayed.Example:Todolistthatiscategorizedas"Writing"shoulddisplaywithcontentchunksthatgiveadviceonwriting.GroupingsofToDolistsFriends/Co-workersProjects,etc.RSSfeedsApproachesToDo’s,Users,andFilesareobjects.I’llmapURLstovariousviewsonthoseobjects.I’llprobablyusearelationaldatabasetopersisteverythingexceptthefiles,whichI’llletmyframeworkhandle.Filesaredocuments.That’seasy.ToDo’sare““content-less”objects.IneedtofigureoutafolderforallofthisstufftoliveinandhowIwanttorelateToDo’stofiles.I’llmapURLstovariousviewswhichwillrequestdatafromtherepositoryviaREST.Five-minutelookatDjangoCreatinganewDjangoappDefiningacontentmodelCreatingatemplateModelViewControllerUsingtheadminsitetoeditobjectinstancesSource:WilliamGottliebFunDjangoFacts:Startedasaninternalprojectin2003attheJournal-Worldnewspaper(Lawrence,KS)Namedafterjazzguitarist,DjangoReinhardtTheOnionrecentlymigratedtoDjangofromDrupalModelfromdjango.dbimportmodelsfromdjango.contrib.auth.modelsimportUserfromdatetimeimportdate,datetimeclassToDoItem(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(User,related_name='todo_creator')assignee=models.ForeignKey(User,null=True,blank=True,related_name='todo_assignee')#attachments=Document#ArrayofCMISdocuments

def__unicode__(self):returnself.titleclassTag(models.Model):name=models.CharField(max_length=64,unique=True)toDoItems=models.ManyToManyField(ToDoItem)

def__unicode__(self):returnmodels.pyURLsmaptoViewsurlpatterns=patterns('',(r'^admin/',include(admin.site.urls)),(r'^$',main_page),(r'^user/(\w+)/$',user_page),(r'^login/$','django.contrib.auth.views.login'),(r'^logout/$',logout_page),(r'^register/$',register_page),(r'^register/success/$',direct_to_template,{'template':'registration/register_success.html'}),(r'^create/$',todo_create_page),(r'^save/(\d+)/$',todo_save_page),(r'^site_media/(?P<path>.*)$','django.views.static.serve',{'document_root':site_media}),(r'^tag/([^\s]+)/$',tag_page),(r'^tag/$',tag_cloud_page),)settings.pydefuser_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,'show_edit':username==request.user.username,})

returnrender_to_response('user_page.html',variables)views.py<html><head><title>DjangoToDo's|{%blocktitle%}{%endblock%}</title><linkrel="stylesheet"href="/site_media/style.css"type="text/css"/></head><body><divid="nav"><ahref="/">home</a>{%ifuser.is_authenticated%}welcome,<ahref="/user/{{user.username}}/">{{user.username}}</a>!|<ahref="/create/">newtodo</a>|<ahref="/logout">logout</a>{%else%}<ahref="/login/">login</a><ahref="/register/">register</a>{%endif%}</div><h1>{%blockhead%}{%endblock%}</h1>{%blockcontent%}{%endblock%}</body></html>base.html{%extends"base.html"%}{%blocktitle%}{{username}}{%endblock%}{%blockhead%}ToDo'sfor{{username}}{%endblock%}{%blockcontent%}{%include"todo_list.html"%}{%endblock%}user_page.html{%iftodos%}<ulclass="todos">{%fortodointodos%}<li><ahref="/todo/{{todo.id}}"class="title">{{todo.title}}</a>{%ifshow_edit%}…todo_list.htmlTemplateInheritanceAlfrescoapproachContentConsumerUICustomSurfpages/templates/componentsforthe"front-end"userinterfaceAdministrativeUILightly-customizedAlfrescoShareDataPersistenceCustomcontentmodelforproperties,associations(ToDodatalisthappenstoalreadyexist)DocumentlibraryforfilesandcontentchunksDataListobjectsforToDoitemsRuleonafoldertoaddtaggableandclassifiableaspectstonewobjectsAlfrescoapproachBusinessLogicSharewebscriptstogenerateUIandhandleformpostsRepowebscriptstohandleJSONPOSTsthatcreatenewdata(fileupload,newtodo)RepowebscriptstohandleGETsthatretrieveexistingdata(chunksforagivencategory,todolistinfo)JavaScriptforallweb-tierandrepo-tierwebscriptcontrollers(fastdev,cutsdownonrestarts)Demo:AtaleoftwoframeworksSharesiteDatalistcontentmodelSurfpages&webscripts(XML,FreeMarker,JavaScript)Repositorywebscripts(minimal)SurfconfigAlfrescouserfactoryShareconfig(minimal)RDBback-endSchemamanagedbyDjangoPythonclassesModelControllers(“Views”)FormsURLmappingAdminUIWorkRemainingAddfileuploadtobothDjangoandAlfrescoToDo’sDjangohasaFiletypeDjangosupportscustomFileManagers(Hello,CMIS!)Refactordjango-alfrescotouseCMIS;e.g.,CmisDocumenttypeAdd““categorizablechunk””tobothSearchFriendslistSource:jphilipgComparisonBothhavedecenttoolingpydevforDjangoEclipse/STS,Roo,Maven,AntforAlfrescoModel,forms,querymucheasierinDjango“Learningwherestuffgoes”MuchfasterinDjangoSurfdocumentationis“stillevolving”Source:TheBusyBrainToDoDemoAppAlfrescoDjangoNumberoffiles7523Alfresco#ofFilesbyTypeDjango#ofFilesbyTypeComparison(cont’’d)GotchasLackofquery-ableassociationsinDMrepowaspainfulAddusertoSharesiteonuserregistrationpostCreatearuleonthedatalistfoldertosetownerKeeptrackofassigneeadd/removeAttempttosimplifyactuallymadeSurfsiteharderFormswithoutJavaScriptNopickersNotfullyleveragingAlfresco’sformserviceSource:automaniaToDoDemoAlfrescoDjangoLinesofCode1,578674AlfrescoLOCbyTypeDjangoLOCbyTypeHEAVYSHARECUSTOMIZATIONAreal-worldexampleSaaSplatformwantsacommunitysitewithresourcestheircustomersneedtoleveragetheplatformbetterContentchunks&filesDiscussionthreads,blogsEverythingtaggedagainstmultipletaxonomiesConsumerUIContentManagement/AdminUIArchitectureLightlycustomizedShareAdminUIConsumerUIHeavilycustomizedShareContentModelBehaviorsRulesWebScriptsThemeYUIFormServiceWebScriptsContentManagersCommunityUsersDataModelGlobalShareSiteClientShareSitesProjectShareSitesUsers&GroupsClientIDoncm:us

溫馨提示

  • 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)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論