What Every New Developer Should Know About Alfresco (Jeff Potts)
-
Upload
oksana-kurysheva -
Category
Technology
-
view
289 -
download
0
description
Transcript of What Every New Developer Should Know About Alfresco (Jeff Potts)
![Page 1: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/1.jpg)
What Every New Developer Should Know About Alfresco Jeff Potts Chief Community Officer
![Page 2: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/2.jpg)
Coffee Shop by Bbunchofpants
![Page 3: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/3.jpg)
Content Models
The rough equivalent to Data Definition Language in Alfresco
![Page 4: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/4.jpg)
Everything is a node, nodes are typed Content Model is expressed in XML
• Defines types, aspects, properties, associations, constraints
• Cold-deploy most common, hot deploy possible
Hierarchical • Types inherit from super types
Extend the out-of-the-box model with your own
![Page 5: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/5.jpg)
Forms Forms are modeled in XML
• Explorer: web-client-config-custom.xml • Share: share-config-custom.xml
Form Service • Processes and persists form data • Filters for intercepting form data before and
after form submit • RESTful API for retrieving form model as
JSON
![Page 6: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/6.jpg)
Rules
You can automate a lot of content processing using rules that trigger rule actions
![Page 7: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/7.jpg)
Rules save time Defined in the UI by end-users If this (criteria) then that (action) Associated with a folder
• Can optionally be applied to sub-folders Can easily add your own custom actions to
the list
![Page 8: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/8.jpg)
Web Scripts
Roll your own REST API using this MVC framework or leverage the out-of-the-box URLs
![Page 9: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/9.jpg)
Roll your own REST API Web Script Framework used to declare a
URL, bind it to logic, provide views • Model-View-Controller pattern • Controller implemented in server-side
JavaScript or Java • Views implemented in FreeMarker
Deployed to the repository or the classpath Can also have web scripts on the Share tier
![Page 10: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/10.jpg)
Out-of-the-box URLs Web script console lists all web scripts
• http://localhost:8080/alfresco/service/index • http://localhost:8080/share/service/index
Pay attention to the lifecycle • Lifecycle “internal” may change without
warning Use CMIS or public API whenever possible
![Page 11: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/11.jpg)
Web Scripts run in both tiers Web scripts exist in
both tiers They access different
sets of objects They communicate over
HTTP/S Code running in the
browser can invoke web scripts in either tier (not shown)
XML/JSON over HTTP/S
Apache Tomcat
Spring Surf Web Script Framework
alfresco.war
Spring Surf Web Script Framework
share.war
![Page 12: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/12.jpg)
CMIS
CMIS is the preferred API for integrating with Alfresco
![Page 13: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/13.jpg)
The Beauty of CMIS
My Custom Application Third-Party Systems
CMIS API
Standard integration
Standard integration
![Page 14: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/14.jpg)
Use CMIS for CRUD functions Important ECM industry specification
managed by OASIS Alfresco uses OpenCMIS, the de facto
standard implementation of the spec • Available at http://chemistry.apache.org
All you need is a service URL For Java, Python, .NET, PHP, Objective-C,
Android libraries see Apache Chemistry
![Page 15: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/15.jpg)
Service URLs by Version
Alfresco Version
CMIS Service URL
3.2r2 - 3.4 http://localhost:8080/alfresco/service/cmis (ATOM) http://localhost:8080/alfresco/cmis (SOAP)
4.0 http://localhost:8080/alfresco/cmisatom http://localhost:8080/alfresco/cmis (SOAP)
4.2.d/e/f, 4.2 Enterprise
http://localhost:8080/alfresco/api/-default-/cmis/versions/1.0/atom http://localhost:8080/alfresco/api/-default-/cmis/versions/1.1/atom http://localhost:8080/alfresco/api/-default-/cmis/versions/1.1/browser http://localhost:8080/alfresco/cmis (SOAP)
![Page 16: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/16.jpg)
Extensions
Avoid changing files included with the Alfresco distribution
![Page 17: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/17.jpg)
Use AMPs to package extensions An AMP is a ZIP with a special folder
structure, a manifest, and a strange name The MMT is used to deploy (merge) your
AMPs with alfresco.war and share.war Use AMPs even when you do not intend to
publicly distribute your customizations https://wiki.alfresco.com/wiki/
Packaging_And_Deploying_Extensions
![Page 18: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/18.jpg)
Debugging
Use the source, turn up logging verbosity, leverage one of many consoles
![Page 19: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/19.jpg)
Developer, heal thyself Configure Eclipse for remote debugging Turn up logging in log4j.properties Turn on the server-side JavaScript
debugger Use a client-side JavaScript debugger Use Florian Maul’s JavaScript Console Use the Node Browser Use the OpenCMIS Workbench Use SurfBug if you are doing Share custs
![Page 20: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/20.jpg)
Asking for Help
Help the Alfresco community help you
![Page 21: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/21.jpg)
Help us help you The community welcomes everyone Invest some sweat equity
• Read the docs • Search the web • Try a few things before asking for help
Be specific Be polite Pay it forward
![Page 22: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/22.jpg)
Resources Alfresco Forums
http://forums.alfresco.com
Alfresco Wiki http://wiki.alfresco.com
Alfresco Blogs http://blogs.alfresco.com
CMIS Resources http://cmis.alfresco.com
ECM Architect Blog http://ecmarchitect.com
Documentation http://docs.alfresco.com
Freenode IRC #alfresco
Code Examples http://code.google.com/p/share-extras https://code.google.com/p/alfresco-api-java-examples/ https://github.com/jpotts/alfresco-developer-series
Full list at: http://www.alfresco.com/resources/documentation/getting-started
![Page 23: What Every New Developer Should Know About Alfresco (Jeff Potts)](https://reader034.fdocuments.net/reader034/viewer/2022051611/54b6b4144a7959e71f8b45eb/html5/thumbnails/23.jpg)
Thank You!
Jeff Potts @jeffpotts01 http://ecmarchitect.com