Open Source CMS, MDD, TDD: Pros and Cons Eclipse Texo, Seam, Alfresco, XForms, Assembla Real world project highlights Дмитрий Горячко Eclipse Texo Project независимый J2EE консультант, основатель команды JazzTeam, Eclipse committer 17.10.2010 JazzTeam.org Springsite.com Eclipse Foundation 00 Введение • О чём я расскажу – – – – – – Eclipse Tex o Project 2/42 Commercial outsourcing + open source Коротко об enterprise Java CMSs Презентация Texo Eclipse project Alfresco introduction and tips Open Source customization Project highlights • Постараюсь, чтобы рассказ был не сухим и был интересным не только для java разработчиков JazzTeam.org Springsite.com Eclipse Foundation Yageo.com Eclipse Tex o Project 3/42 • Самый крупный производитель деталей для электроники • Исторически сайт создавался компанией springsite.com • Web 2.0 фаза JazzTeam.org Springsite.com Eclipse Foundation Yageo.com Eclipse Tex o Project 4/42 JazzTeam.org Springsite.com Eclipse Foundation Eclipse Tex o Project 5/42 JazzTeam.org Springsite.com Eclipse Foundation Как появился заказчик • Всегда вкладывай в людей, с которыми работаешь – Получена рекомендация • У думающих людей не бывает плохого опыта – Экспертиза fits requirements (Epam CMS) • Мой вопрос к Аркадию Добкину и его ответ про продуктовые и аутсорсинговые компании Eclipse Tex o Project 6/42 • Мысль материальна – Заказчик из мира Open Source JazzTeam.org Springsite.com Eclipse Foundation Задачи Eclipse Tex o Project 7/42 • Integrate enterprise CMS • Contact management • Complicated search among all the products (including competitors) • E-news, subscribers management • Products management (batch update too) • Web statistics • Support all possible roles, flows (editor, admin, technical admin) • All should be friendly-administrated JazzTeam.org Springsite.com Eclipse Foundation Let us scrum Eclipse Tex o Project 8/42 киевское метро JazzTeam.org Springsite.com Eclipse Foundation Особенности организации проекта Eclipse Tex o Project 9/42 JazzTeam.org Springsite.com Eclipse Foundation Особенности организации проекта • Distributed scrum team • Customer is Open Source contributor – Open for architecture changes – No fear, motivated to new – Not formal, friendly attitude • Доверяйте интуиции Eclipse Tex o Project 10/42 – Первая оплата через 2 месяца после начала проекта – Проект на 2 года с большой плотностью инноваций весь срок JazzTeam.org Springsite.com Eclipse Foundation Why not to use Mind Maps for project documentation Eclipse Tex o Project 11/42 JazzTeam.org Springsite.com Eclipse Foundation Why not to use Mind Maps for project documentation Eclipse Tex o Project 12/42 JazzTeam.org Springsite.com Eclipse Foundation Open for architecture changes • Feel free to customize if need (coding) Eclipse Tex o Project 13/42 – Seam – Alfresco – Chiba (OS W3C XForms implementation) – Hibernate – Eclipse Texo • New phase of development (project Teneo) JazzTeam.org Springsite.com Eclipse Foundation No fear, motivated to new • We need apply recursion into XForms and implement/built in recursive AJAX UI – let us invest time/money into it and gain knowledge on this area deeper – Конечно, позволял заказчик – 2 человека-месяца (с высокой квалификацией) Eclipse Tex o Project 14/42 • Alfresco server debug • Complicated UI (hundreds of recursive controls, which are widgets itself) JazzTeam.org Springsite.com Eclipse Foundation Recursive XSD widgets (xs:switch) AJAX based Eclipse Tex o Project 15/42 JazzTeam.org Springsite.com Eclipse Foundation Recursive XSD widgets (xs:switch) AJAX based Eclipse Tex o Project 16/42 JazzTeam.org Springsite.com Eclipse Foundation Recursive XSD widgets (xs:switch) AJAX based Eclipse Tex o Project 17/42 Jazz Koktebel JazzTeam.org Springsite.com Eclipse Foundation Deployment Eclipse Tex o Project 18/42 JazzTeam.org Springsite.com Eclipse Foundation 01 Технологии • • • • Alfresco & ECMSs Texo Seam MDD & TDD Eclipse Tex o Project 19/42 JazzTeam.org Springsite.com Eclipse Foundation Alfresco notes • • • State of art. Wanna grow in Java – study sources of Alfresco or Seam Modularity All is node and services around – – Not only document management Everything related to node could be implemented • • Flows, Web Forms and many other things – • Eclipse Tex o Project 20/42 • • • Node type extendable XSD + XSLT (other templating language) = XML, HTML, JS, Java, JSF – anything Web scripting The same model as Epam CMS It is possible to have XSD describing layout Крым, Симферополь, Детский джазовый концерт JazzTeam.org Springsite.com Eclipse Foundation Texo Eclipse project presentation Eclipse Tex o Project 21/42 By springsite.com JazzTeam.org Springsite.com Eclipse Foundation Texo Eclipse project presentation ORM JPA Hibernate Eclipse link XSD XML EMF ECore Java In memory Eclipse Tex o Project 22/42 Your own format TDD JSON/Rest GWT UI part Web Services Planned Under development by me JazzTeam.org Springsite.com Eclipse Foundation Seam • • • • • • • Eclipse Tex o Project 23/42 JSF Creator of Hibernate Contexts Interceptors without AoP Built in IoC Rather new community Sometimes it is hard to debug and investigate what is wrong • Good community • State of art (contexts) JazzTeam.org Springsite.com Eclipse Foundation Seam • Eclipse Tex o Project 24/42 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd http://jboss.com/products/seam/international http://jboss.com/products/seam/international-2.1.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd http://jboss.com/products/seam/async http://jboss.com/products/seam/async-2.1.xsd"> JazzTeam.org Springsite.com Eclipse Foundation Seam Eclipse Tex o Project 25/42 • <core:manager conversation-timeout="120000" concurrent-request-timeout="500" conversation-id-parameter="cid" /> • <transaction:entity-transaction entitymanager="#{em}" /> • <persistence:entity-manager-factory name="yageo" /> • <persistence:managed-persistence-context name="em" auto-create="true" entity-manager-factory="#{yageo}" /> • <core:init transaction-managementenabled="false" /> JazzTeam.org Springsite.com Eclipse Foundation XForms & chiba Eclipse Tex o Project 26/42 • Server and client model • XML • XSD description of structured form (even recursive – if your framework supports it ) • http://en.wikipedia.or g/wiki/XForms • Not only for internet • Could be MVC From http://www.w3.org/MarkUp/Forms/ JazzTeam.org Springsite.com Eclipse Foundation XForms & chiba • <xs:complexType abstract="true" name="PublicationType"><xs:sequence> <xs:element name="Title" type="xs:string"/> <xs:element maxOccurs="unbounded" minOccurs="0" name="Author" type="xs:string"/> </xs:sequence> </xs:complexType> • <xf:instance id="instance_0"> <yageo:Catalogue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:yageo="http://www.yageocom/cms/article"> <yageo:Publication xsi:nil="true" xsi:type="BookType"> <yageo:Title/> <yageo:Author alf:prototype="true"/> <yageo:ISBN/> <yageo:Publisher/> </yageo:Publication> </yageo:Catalogue> </xf:instance> • <xf:bind id="bind_0" xf:maxOccurs="1" xf:minOccurs="1" xf:nodeset="/yageo:Catalogue" xf:readonly="false()" xf:required="false()"> • <xf:group id="alfresco-xforms-root-group" xf:appearance="full"> <xf:label id="label_0">Catalogue</xf:label> • Eclipse Tex o Project 27/42 <xf:group id="group_1" xf:appearance="repeated"> <xf:trigger id="repeat_1-delete" xf:bind="bind_5"> <xf:label id="label_25">delete selected</xf:label> <xf:action id="C56"> <xf:delete id="delete_1" xf:at="xf:index('repeat_1')" xf:nodeset="/yageo:Catalogue/yageo:Publication [index('repeat_0')]/yageo:Author"/> JazzTeam.org Springsite.com Eclipse Foundation 02 a little bit jump into project Eclipse Tex o Project 28/42 В Крыму JazzTeam.org Springsite.com Eclipse Foundation Layouts flow Restart publish etc Html design divs ECore User Templates Xslt/freemarket XSD Layout content block Alfresco web forms xml Required Java Eclipse Tex o Project 29/42 Texo ResourceBundle, Configs, Even web.xml JazzTeam.org Springsite.com Eclipse Foundation Seam JSF Layouts flow • Content block позволяют рассматривать новый функционал как UI плагины (виджеты). Автоматически поддержка CMS. Eclipse Tex o Project 30/42 JazzTeam.org Springsite.com Eclipse Foundation Project data exchange Eclipse Tex o Project 31/42 JazzTeam.org Springsite.com Eclipse Foundation Open Source contribution results • Eclipse Teneo (only ORM) > Texo – One more Eclipse member • Chiba changes contribution • Tries to discuss XForms standard changes • Seam forum participating – Issue with contexts • Alfresco changes – Dramatic • WCM AJAX, layout to manage renditions, others Eclipse Tex o Project 32/42 – A wish to become commercial committer – Contribution is sent but particularly ignored JazzTeam.org Springsite.com Eclipse Foundation Типы кастомизаций • IoC, reflexion через файлы настроек • Скачать сырцы, что-то изменить, переподложить под сервер • Сырцов нету (multivalent.sourceforge.net). Decompile, adjust, compile Eclipse Tex o Project 33/42 • Два последних варинта рискованны, если продукт будет долго развиваться. JazzTeam.org Springsite.com Eclipse Foundation Open Source model of project • vertical model - OOP > reusable components > frameworks > open source > usage at next projects • Motivation • Convenient way to touch with partners Eclipse Tex o Project 34/42 – Ask them to join your OS project and see what happens • All that is done for free in minutes, and results in a week (productivity etc) JazzTeam.org Springsite.com Eclipse Foundation Open Source cons (то, что всплыло на проекте) Eclipse Tex o Project 35/42 • Weak communities • Not always user centric development • Смешение технологий – for handy people • Нет успокоения (но и нет старпёрства) • Customizations, customizations, customizations • Effort on R&D Из интерьера знаменитой 49 квартиры JazzTeam.org Springsite.com Eclipse Foundation Money? • • • • • • • Become committer with potential customer Long investments Create popular industry/direction (что сейчас делается в проекте Texo) Конференции, где бывают заказчики мира Java Open Source Independent consulting Name A way to start cooperation with people immediately – – Eclipse Tex o Project 36/42 For eclipse – not one month of contribution For sourceforge etc. • • • Create user Add to project Develop Use Case Способный customer facer Могу дать телефон JazzTeam.org Springsite.com Eclipse Foundation CMS • Good to have XSD support – And recursion Eclipse Tex o Project 37/42 • Good to become an entry point for all the management/admin pages • Good to be node specific • Good to have web scripting • finally flows • And convenient management of renditions • E-CMS integration should allow to do (web.xml, configs, bundles, localization) in the way you use wordpress JazzTeam.org Springsite.com Eclipse Foundation Bonus 00: j2ee vs ruby (basing on mashpit trainings) • • • • • • • • • Eclipse Tex o Project 38/42 • • • Context handling Много времени для вхождения новичкам Хостинг дешевеет, clouding Java is up to have closures Byte code manipulators Aop, IoC, OSGI Simple syntax Proved technology MVC frameworks: spring, struts, seam. Tons of views, TDD ORM and JPA Ant, Maven Good to have compilation errors Стенсил во Львове JazzTeam.org Springsite.com Eclipse Foundation Bonus 01: расширяемое программирование in Java • • • • • • • • Eclipse Tex o Project 39/42 • • • • • Пляшем от полиморфизма Generics IoC(spring, self-made, seam, web.xml, context.xml) Dependency injection (interceptors, chains), AoP (joints) Patterns Plugins (self made, OSGI, etc.) WS-* (service mix, equinox, wsdl, JSON, REST) Bytes manipulation (create classes on the flight, interception on the flight – hard to debug) Polymorphic systems (ruby frontend – java backend) Class loading art UI: widgets, web scripting MDD, TDD, CMS took important role Built in scripting JazzTeam.org Springsite.com Eclipse Foundation Выше показан один из возможных вариантов развития проекта и команды. Нет единого рецепта. Open Source company? Product based company? Outsourcing? Trainings? I do not know Eclipse Tex o Project 40/42 Балкончик без лесенки JazzTeam.org Springsite.com Eclipse Foundation Спасибо! Надеюсь, было интересно и полезно! Вопросы? Eclipse Tex o Project 41/42 Презентацию можно найти здесь jazzteam.org/devcamp10 • [email protected] • Zmicer.com JazzTeam.org Springsite.com Eclipse Foundation Opportunities • Вы желаете обучаться или работать на java • Участвовать в Open Source • Вам нравятся небольшие Scrum команды • Вы думаете об удалённой работе • Хотелось бы поработать за границей, но не знаете как • Тренинг повышения эффективности Java программиста Java Brains Reloading Eclipse Tex o Project 42/42 Давайте пообщаемся после презентации! JazzTeam.org Springsite.com Eclipse Foundation