CMS choices for multitenant ecommerce application in Java - java

I need help choosing a CMS product to suit an e-commerce application with some complex unique features. I'm considering using an existing CMS because I don't have the budget to build my own versions of:
copy editor
page layout tools
site map editor (optional)
I'd considered Spring.MVC and JBoss Seam as framework alternatives and JSP/JSTL and Facelets/JSF as view technologies before realising the CMS may drive this choice.
Since there are six customers to start with I was very keen on a multi-tenant architecture with branding applied to each tenants pages.
I see two architectural alternatives:
Build a bespoke multitenant site based directly on a web framework and "pull in" content via JCR.
Deploy a multi-tenant CMS and somehow add the unique functions.
The "unique functions" are an interactive designer to build exactly the product you want. Once built the product is added to your cart and there is then the normal payment and account set-up functions to consider. All still within a multi-tenant situation.
I am quite happy for the content editing functions to sit in a separate web app it would be sufficient for me to operate this on behalf of the six customers, but ideally they would also have access. There is no need for this to be branded at all.
Any suggestions?

If you are planning to develop custom functional requirements on top a cms, then I would recommend liferay portal. It's an open source portal comes with built in cms. It also comes with shopping cart portlets and many more built in portlets and themes. It can provide you a multi tenancy solution with strong user/role based permissioning mechanism. It can integrate with active directory and you can configure single sign on solutions easily. You can develop custom requirements as JSR168 or JSR286 compliant portlets and deploy them to liferay portal. Also you will have options to extend/customise liferay functionalities via hooks and extension environment capabilities.

Take a look at dotCMS, an open source CMS built on top of Liferay. It is a flexible java solution that makes running multiple sites within a single instance easy.
Sites can share content, assets and templates, or not share anything depending on how you set them up.
Users can have access to manage one site or many sites - their views into the management tool are limited by their permissions (as you'd expect).
Again, I am biased, but this is exactly the problem that dotCMS was designed to solve.

Related

Options to re-using an Applet's existing code?

After five and a half years full-time work on a product ranking engine project, which revolves around a 64,839 line applet, the browser companies have seen fit to dump applets.
At this point I am in no position to convert the applet to another language (unless I get a huge injection of funds to hire a team of programmers). My partner is not going to support me for another two years.
I know the questions are rather vague and I should be keeping up with the latest tech, however I've had chronic earaches for 14 years that affect memory and concentration, so programming is difficult enough without trying to keep up with the latest developments in software as well. The reason I am asking for advice is that I don't want to make another monumental screw up.
Question 1: My understanding is that Java Web Start launches the application, but it then cannot communicate back to the JSF web page any more (JSF2.0). Is there any way of getting around this?
Question 2: Can anyone suggest any other options other than re-coding the whole thing?
Question 3: Is it likely that applets will be altered to use the latest plugin format or are they gone for good? Does anyone have any inside information on this?
Overview of the applet's requirements:
The applet allows a user to customise some or all of the product ranking criteria, which has been preset by a panel of knowledgeable experts, to their own particular needs. The criteria is stored and edited via graphs (custom painted jPanels).
The ranking criteria can be altered entirely using the mouse (to change the graph shapes), though some values can be entered using the keyboard if the user wishes. Once customised, the applet is then used to submit the changes to the ranking engine server.
It is also used to allow third party experts to alter the ranking criteria to create their own product usage category ranking criteria. The third party expert can then place links on their own web site that will allow users to rank products using the third party expert's own ranking criteria. This allows anyone to create their own ranking criteria for use by others.
The applet uses a plugin bean that is also used in a standalone Java editor application, which is used to create a product usage ranking criteria file from scratch (the editor is 77,710 lines of code, though 61,257 lines of that is the plugin which is also used in the applet). This means most likely having to convert the editor as well, as the two are inextricably linked. The plugin basically is the applet and also the editor.
The plugin can capture, edit and store ranking criteria for virtually anything the human brain can rank. Thanks to the graphs, it can use any attribute that the brain uses, and for which we have no formal system of measurement; hence why the applet is so damn big.
Your question is probably too broad for Stack Overflow, but I'll give a brief response.
Java Web Start
Java Web Start is probably the best route for you. This technology is basically a convenient way for a user to obtain, install, and run a Java desktop app. The web browser is only used to initially download a small XML file describing your app and where to get the app. The Java Network Launching Protocol (JNLP) defines these pieces of information stored in that XML file. Your app will be downloaded from a server, and saved to the local machine. A Java Runtime Environment (JRE) can be downloaded and installed if need be as part of the process.
By default the app runs within a security sandbox similar to Java Applets. But you can sign your app and define security protocols to break out of some of those restrictions including making network connections.
The bulk of your programming would remain intact. The app is still pure Java, running in a JVM. You would need to do a bit of reprogramming to be a desktop app rather than packaged as an Applet. And you would have to learn about easing those sandbox restrictions. And your app will have a menu bar of its own as a full-fledged app, so you may want to take advantage of that. But the guts of your app would remain the same.
Over the years, Sun & Oracle have put efforts into improving Java Web Start. Unfortunately it came too late after Java-on-the-desktop had lost too much mind-share. And Swing never got the overhaul it so desperately needed. So Java Web Start never went big-time. But Java Web Start does work as advertised, so give it a try.
While there were some security issues years ago, I believe they have been resolved long ago. The many infamous security problems with Java were largely involving the web browser plugins bridging between browsers and the Java JRE; those problems do not affect Java Web Start (though you should do your own research to confirm).
For the general public, Java Web Start may be too much to ask of new, anonymous, and less-motivated users. For a commercial product with a user-base of eager customers, it may the perfect solution for you. I suggest you do some more study, read the Wikipedia page, study the Oracle technology page, look at the Tutorial, read this overview by John Zukowski that includes an example of network (making socket connection to time.nist.gov), and so on.
Vaadin
The Vaadin framework is an open-source free-of-cost professional user-interface development framework that uses pure Java to run your app on a server in a Java Servlet web container while automatically generating a user-interface using standard web technologies (HTTP, HTML, CSS, JavaScript, GWT, WebSocket, etc.) for presentation within a regular web browser (Firefox, Chrome, Safari, IE, Edge, etc.). As a graybeard, I think of Vaadin as an X Window System for the new millennium: The user interacts with screen widgets on their local computer but the business logic of the app is executing on the server, and the server is updating the remote UI as a result of that business logic executing.
Vaadin is not yet-another-web-templating system. Instead, your app is written in pure Java. No need for you to learn the alphabet-soup of web technologies listed above. Vaadin takes care of that for you, auto-magically. You say in Java “I want a label, then a field, and a button” and Vaadin makes those appear in the web browser.
Using Vaadin would allow you to retain your Java code for the business logic part. But you would need to re-write the user-interface parts to use Vaadin widgets instead of Swing widgets. This would not be so terribly difficult as Vaadin was inspired by the general style of Swing, defining layouts governed by layout managers in which you place your various widgets (fields, labels, buttons, etc.).
Vaadin can make very professional business-oriented apps that feel almost like desktop business apps. Tip: I prefer the Reindeer theme for business apps over the newer Valo theme.
But you mentioned some kind of free-form drawing canvas in your Swing applet. That may be a sticking point. I do not know of such a widget for use within a Vaadin app. I am not saying there is no such thing, I just do not know of any. There are slider widgets that may useful, but I don't clearly understand your needs in that regard.

When to use JPA/EJB and JSF when building apps in oracle adf

I need some inputs on ADF framework and application/project types. I am re-writing an existing Oracle Forms 6 application to a Java J2EE Application. I am exploring Oracle ADF framework along with other framworks such as struts 2 with jsf and sping & hibernate with jsf.
Here are the requirements of my new application.
3 tier architecture application
Need rich UI functionality such as dynamic tables, charts, file export from tables etc..
Use existing database tables to view, edit and save data
Flexbile design to change, edit, or add new pages and business logic
Support business rules
Flexibility to add expose some of the business services as web services
Support crud operations on large database tables
Support https using oid and ldap
I have couple of questions.
1) Do you recommend Oracle ADF?
2) Does oracle ADF framework support all the above requirements?
3) I found tutorials for "Developing with Oracle ADF" and "Oracle ADF with JPA/EJB and JSF" on Oracle's site. Which one suits better for my needs? When to use JPA/EJB in ADF application?
Any insight on the above is highly appreciated. Thanks in advance.
Here's my take:
3 tier architecture application
Any Java EE or Spring based app will satisfy this. Spring will force you to layer your application well.
Need rich UI functionality such as dynamic tables, charts, file export
from tables etc..
You're more likely to get these using UI form elements from jQuery, d3 and other JavaScript based libraries. Framework won't restrict your choices there.
Use existing database tables to view, edit and save data
JDBC or anything built on top of it (JPA, Hibernate, etc.) will make this possible.
Flexible design to change, edit, or add new pages and business logic
No framework will make this easy. You'll have to get a shovel and do the work regardless.
Support business rules
You can express business rules in many ways: code, state machines, Rete rules engines. Which one do you want?
Flexibility to add expose some of the business services as web
services
You can do this regardless of framework choice. Spring has nice contract first, xsd-based web service remoting.
Support crud operations on large database tables
Large is immaterial. JDBC allows CRUD.
Support https using oid and ldap
I don't see what HTTPS has to do with LDAP.
Your questions don't suggest a senior Java guy to me.
I would not recommend either Struts or JSF. Both are 90s technology that aren't suited for mobile platforms. The world is moving towards HTML5, CSS3, JavaScript. I'd suggest that you do so, too.
If you want to use Spring I'd stick with their web MVC. It's superior to both Struts and JSF, and you get all the other good stuff that Spring offers (e.g. DI and AOP).
Personally I think the fixation on Oracle ADF is too strong. It ties you in just as much as Oracle Forms once did.
I'd think about this in terms of web services, REST or SOAP, and flexible UIs. Decouple the front and back ends completely. UIs come and go, but a good service model for your business processes, at the right level of granularity, will stand up for a while.
One benefit of ADF is it's one integrated product and all the pieces are designed to fit and work together with the tooling built into and supported by JDeveloper. No real setup or having to "make things work together." It simply does, OOTB.
The other solutions will require some "piecing together" to a greater or lesser degree. ADF is completely integrated from data source - RDB, WS, POJO, EJB, whatever, to UI.
Also, any 3rd party fwk you use is going to cause tie-in.
ADF ties you to Java, but this is not as strong a tie-in as Forms which uses proprietary PL/SQL.
ADF Faces is based on, but extends JSF, which is hardly 90's technology, having been introduced in 2004. Also, it can easily be used with JS libs as needed. I suggest you look at the ADF success stories. Oracle built their entire new set of Business Apps using ADF. They literally bet the company on it. Doubt they would have done that with second class, substandard technology.
Tooling support is better for ADF BC than JPA - but either can be used. Also, ADF Faces supports development and deployment to either iOS or Android from the same UI design. Not sure there is any other fwk that can say that.
And yes, ADF supports all your requirements.
And ADF essentials, hosted on community edition glassfish, is free.
This link talks to: JPA or ADF BC.

Questions about Spring DM,OSGi and web application

I've started looking at osgi with the main purpose to achieve the task ahead of me. Basically i would be able to distribute an web based application and build specific features of the whole web app separately in such a way that i can deploy at A my web app with features a,b,c and deploy at B with features a,c,d.
A little like how one can install plugin in joomla. So for example when i want to add a different aspect of the web application, i would build a small war with all the html and its admin section and have this feature admin section available in the main admin panel.
Second question is about Spring DM. most likely i will be using Spring and it seem logical i see what Spring DM has to offer.After downloading Spring DM .1.2.1 i found out that its lib folder contains spring jars for version 2.5.6.SEC01 but i planned on using 3.1.2 so am a little confuse as how everything will play nice together.
Thanks for reading
I've just been doing such an exercise so I can shed some light how you do it without the overhead of Spring. I've made a clear division: all application code is in the browser, all data handling is in the server. With HTML5 the browser has grown up to an impressive, portable, and powerful application environment. One has multiprocessing, messaging, modularity, and amazing visuals. I am using angularjs as the framework in the browser.
Angular works with a central routing table mapping the hash part of the page url to "modules" in Javascript. This makes it very easy to define what modules are part of the application. The server can easily control this part.
On the server side I have bundles that carry the Javascript code, the html fragments and the data handling. I based this on the OSGi Http Server model since it is more flexible. However, I added proper support for static resources in bundles: caching, streaming, ranges, etc.
In the server I used DS and bndtools to develop the bundles. This is an impressive development experience since it works like Smalltalk. You change and it is immediately reflected in the server. Adding bundles, removing bundles, the server keeps on running. Server restarts are rare during development.
The disadvantage is that there are unfortunately very few components that leverage OSGi. Most components, with Spring being the archetypical example, rely heavily on class loading hacks to wire applications from a central point. This is fundamentally not modular. For this reason I had to develop many highly cohesive and uncoupled components that leverage the OSGi service model. Once I get time I will donate them to an open source project.
I'm not sure you need to be considering OSGi, at least not directly, to achieve your state requirements. You said:
Basically i would be able to distribute an web based application and
build specific features of the whole web app separately in such a way
that i can deploy at A my web app with features a,b,c and deploy at B
with features a,c,d.
If these are youre requirements, then you don't actually need to concern yourself with OSGi directly, but rather find a web app framework that supports modular extensions. Which most likely means that the framework itself uses OSGi. I'm not familiar with Spring, but I do know that Struts 2 ( a comparable web app framework ) has an OSGi based plugin meant to achieve your use case.
On the other hand, if your idea is to play with OSGi, then I suggest you pick a lower level task, such as writing a web application framework, rather than a web app itself.

Alfresco - /alfresco and /share difference

So i have installed Alfresco and have two web applications /alfresco and /share. Whats the difference and purposes of these applications? Can one application exist without the other?
/alfresco
This context points you to the Repository application. It's the "core" app, where the content is effectively stored and where all the magic happens. Back in the old times, it was the one and only application, so that when Alfresco introduced Share, it was the only place where to find a UI for some features. Now, Share is missing just a couple things.
Currently, the idea is that this JSF application should be a kind of Admin only interface, only to be accessed whenever Share is missing something. However, if you really love JSF (really?) you can still opt to use this interface to build your Alfresco implementation.
This application is mainly interesting for its features rather than for its UI: all the connections to external systems, like DB, CIFS or IMAP for example, happen from here.
On a side note, the "original" implementation of Alfresco WCM is built around this application. Anyway, because of several reasons this implementation of WCM is being phased out, with a new implementation built around Share and its concepts (e.g. Sites) that will grow quite a lot soon.
Don't expect new fancy development on this UI.
/share
This is usually intended the main UI for end users. No JSF here (thanks, God!), it's a Spring Surf frontend to Alfresco that focuses on providing a Collaborative environment. Here you will find the concepts of Sites, project/topic focussed containers for content, blogs and wikis.
As all the content is stored via the other application, Share is almost stateless: no DB connection is opened from here, everything is pulled and pushed to /alfresco via Alfresco REST API and CMIS.
As already mentioned, the new WCM is leveraged from here, as well as all the common ECM features of Alfresco such as workflows, versioning, document transformations, ACLs and so on. Plus, document previews and thumbnails, Blogs, Wikis, Data Lists, ...
This is most likely the UI Alfresco will continue to improve, adding all the whistles and bells they can come up with.
Adding some more information on latest version alfresco 5.0b.
Major changes in alfresco 5.0b is that Alfresco web client is removed from alfresco.So there wont be any JSF coding
Repository Architecture is still there, So if you want to deal with core app "/alfresco" is the location which will be used for creating webscript,workflows and other thing.
Conclusion
Share will be only used as frontend application.All core portion will
be on alfresco repository.
Alfresco:
By a developer point of view I would describe "alfresco" as the backend repository that sums up most of the functionality for which we use ACS. The services that share uses are defined in alfresco.
Share:
Share was introduced so that a person with not so much technical knowledge may be able to get as much as possible out of the ECM. If you are new to share you should look into model manager, smart folders and actions.
In 2020, think of /alfresco as the repository part of Alfresco and /share as the user interface. Keep in mind that Share is now deprecated and will be replaced more and more with something called Alfresco Digital Workspace. For now, they have most of the same functionality except that the old Share uses an older Javascript framework, called "Surf" that integrates with a much older version of Spring. The Alfresco Digital Workspace is created using Angular and is a client that can be run from its own WAR.

Open-source Java-based framework that has many of the common features built in out-of-the-box?

I am looking for something like Drupal in Java -- not Drupal as a CMS but rather as an application programming framework.
For example I would like to get out the the box:
A Login screen
The ability to define new roles
The ability to tie permissions (capabilities) to roles
The ability to assign roles to specific users (and revoke roles)
The ability to self-service passwords (reset ones own password)
An ability to generate a CRUD app
A menu system (that allows you to define menus)
My understanding is that Ruby-on-Rails provides this type of stuff.
Thanks.
Have a look at Liferay.
It has all you mentioned and a powerful built-in CMS, user management, lots of out-of-the box "applications" (portlets) to add to your pages, lots of themes to choose from, menus and all.
Basically, you can build a complete dynamic site with all the basic functionalities without writing one line of Java code (or any kind of code).
If it is for Web development, go take a look at the Play! framework.
http://www.playframework.org/
You might also look into Backbase http://www.backbase.com/
I have no experience with it, but it's all the rage at my wifes company.
try openxava too
"OpenXava is a tool for Rapid Java Web Development, well-suited for business and database oriented applications"

Categories