open source cms, mdd, tdd: pros and cons

43
17.10.201 0 JazzTeam.org Springsite.com Eclipse Foundation Open Source CMS, MDD, TDD: Pros and Cons Eclipse Texo, Seam, Alfresco, XForms, Assembla Real world project highlights Дмитрий Горячко независимый J2EE консультант, основатель команды JazzTeam, Eclipse committer

Upload: zmicer

Post on 16-Nov-2014

2.358 views

Category:

Technology


4 download

DESCRIPTION

Eclipse Texo, Seam, Alfresco, XForms, AssemblaReal world project highlights

TRANSCRIPT

Page 1: Open Source CMS, MDD, TDD:  Pros and Cons

17.10.2010 JazzTeam.org Springsite.com Eclipse Foundation

Open Source CMS, MDD, TDD: Pros and Cons

Eclipse Texo, Seam, Alfresco, XForms,

Assembla

Real world project highlights

Дмитрий Горячконезависимый J2EE консультант, основатель команды JazzTeam,Eclipse committer

Page 2: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation2/43

00 Введение• О чём я расскажу

– Commercial outsourcing + open source– Коротко об enterprise Java CMSs– Презентация Texo Eclipse project – Alfresco introduction and tips– Open Source customization– Project highlights

• Постараюсь, чтобы рассказ был не сухим и был интересным не только для java разработчиков

Page 3: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation3/43

Yageo.com

• Самый крупный производитель деталей для электроники

• Исторически сайт создавался компанией springsite.com

• Web 2.0 фаза

Page 4: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation4/43

Yageo.com

Page 5: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation5/43

Page 6: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation6/43

Как появился заказчик

• Всегда вкладывай в людей, с которыми работаешь– Получена рекомендация

• У думающих людей не бывает плохого опыта – Экспертиза fits requirements (Epam CMS)

• Мой вопрос к Аркадию Добкину и его ответ про продуктовые и аутсорсинговые компании

• Мысль материальна– Заказчик из мира Open Source

Page 7: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation7/43

Задачи• 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

Page 8: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation8/43

Let us scrum

киевское метро

Page 9: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation9/43

Особенности организации проекта

Page 10: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation10/43

Особенности организации проекта

• Distributed scrum team• Customer is Open Source contributor

– Open for architecture changes– No fear, motivated to new– Not formal, friendly attitude

• Доверяйте интуиции– Первая оплата через 2 месяца после

начала проекта– Проект на 2 года с большой плотностью

инноваций весь срок

Page 11: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation11/43

Why not to use Mind Maps for project documentation

Page 12: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation12/43

Why not to use Mind Maps for project documentation

Page 13: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation13/43

Open for architecture changes

• Feel free to customize if need (coding)– Seam– Alfresco– Chiba (OS W3C XForms

implementation)– Hibernate– Eclipse Texo

• New phase of development (project Teneo)

Page 14: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation14/43

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 человека-месяца (с высокой

квалификацией)• Alfresco server debug• Complicated UI (hundreds of recursive controls,

which are widgets itself)

Page 15: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation15/43

Recursive XSD widgets (xs:switch) AJAX based

Page 16: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation16/43

Recursive XSD widgets (xs:switch) AJAX based

Page 17: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation17/43

Recursive XSD widgets (xs:switch) AJAX based

Jazz Koktebel

Page 18: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation18/43

Deployment

Page 19: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation19/43

01 Технологии

• Alfresco & ECMSs• Texo• Seam• MDD & TDD

Page 20: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation20/43

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

• Node type

• Flows, Web Forms and many other things

– 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

Крым, Симферополь,Детский джазовый концерт

Page 21: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation21/43

Texo Eclipse project presentation

By springsite.com

Page 22: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation22/43

Texo Eclipse project presentation

XML

JavaIn memory

JSON/Rest Web Services

Under development by me

GWT UI partPlanned

Your own formatTDD

XSD

ORM JPAHibernate

Eclipse link

EMF ECore

Page 23: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation23/43

Seam• 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)

Page 24: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation24/43

Seam• 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.xsdhttp://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">

Page 25: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation25/43

Seam• <core:manager conversation-timeout="120000"

concurrent-request-timeout="500"conversation-id-parameter="cid" />

• <transaction:entity-transaction entity-manager="#{em}" />

• <persistence:entity-manager-factory name="yageo" />

• <persistence:managed-persistence-context name="em" auto-create="true" entity-manager-factory="#{yageo}" />

• <core:init transaction-management-enabled="false" />

Page 26: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation26/43

XForms & chiba• Server and client

model• XML • XSD description of

structured form (even recursive – if your framework supports it )

• http://en.wikipedia.org/wiki/XForms

• Not only for internet• Could be MVC

From http://www.w3.org/MarkUp/Forms/

Page 27: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation27/43

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><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"/>

Page 28: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation28/43

02 a little bit jump into project

В Крыму

Page 29: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation29/43

Alfresco based TDD layouts flow

XSDLayout

content block

ECore

Texo

POJO JavaTexo meta

Html designdivs

TemplatesXslt/freemarket

Alfrescoweb forms

User

xml

Seam JSFResourceBundle,

Configs,Even web.xml

Restartpublish

etc

Page 30: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation30/43

Texo based TDD flow

XSD Java POJO

EMF ECore Java Texo meta model

Java Texo Core

Templates

ORM

UI: JS jQuery widget

has access to all

Page 31: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation31/43

Layouts flow

• Content block позволяют рассматривать новый функционал как UI плагины (виджеты). Автоматически поддержка CMS.

Page 32: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation32/43

Project data exchange

Page 33: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation33/43

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

– A wish to become commercial committer – Contribution is sent but particularly ignored

Page 34: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation34/43

Типы кастомизаций

• IoC, reflexion через файлы настроек• Скачать сырцы, что-то изменить,

переподложить под сервер• Сырцов нету

(multivalent.sourceforge.net). Decompile, adjust, compile

• Два последних варинта рискованны, если продукт будет долго развиваться.

Page 35: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation35/43

Open Source model of project

• vertical model - OOP > reusable components > frameworks > open source > usage at next projects

• Motivation• Convenient way to touch with

partners– 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)

Page 36: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation36/43

Open Source cons (то, что всплыло на проекте)

• Weak communities• Not always user

centric development• Смешение

технологий – for handy people

• Нет успокоения (но и нет старпёрства)

• Customizations, customizations, customizations

• Effort on R&DИз интерьера знаменитой 49 квартиры

Page 37: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation37/43

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– For eclipse – not one month of

contribution– For sourceforge etc.

• Create user• Add to project• Develop Use Case

Способный customer facerМогу дать телефон

Page 38: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation38/43

CMS• Good to have XSD support

– And recursion

• 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

Page 39: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation39/43

Bonus 00: j2ee vs ruby (basing on mashpit trainings)

• 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Стенсил во Львове

Page 40: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation40/43

Bonus 01: расширяемое программирование in Java

• Пляшем от полиморфизма• 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

Page 41: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation41/43

Выше показан один из возможных вариантов развития проекта и

команды. Нет единого рецепта.

Балкончик без лесенки

Open Source company?Product based company?Outsourcing?Trainings?

I do not know

Page 42: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation42/43

Спасибо! Надеюсь, было интересно и полезно!

Вопросы?

Презентацию можно найти здесь jazzteam.org/devcamp10

[email protected]• Zmicer.com

Page 43: Open Source CMS, MDD, TDD:  Pros and Cons

JazzTeam.org Springsite.com Eclipse Foundation43/43

Opportunities• Вы желаете обучаться или работать на java• Участвовать в Open Source • Вам нравятся небольшие Scrum команды• Вы думаете об удалённой работе • Хотелось бы поработать за границей, но не знаете как• Тренинг повышения эффективности Java программиста Java Brains Reloading

Давайте пообщаемся после презентации!