IBM Posts Servlet Manager MVC-Style Controller on AlphaWorks

Discussions

News: IBM Posts Servlet Manager MVC-Style Controller on AlphaWorks

  1. AlphaWorks is now the home of ServletManager, an XML-based servlet controller package (in the MVC tradition) that allows a Web app programmers to declare the entire application's flow, application state rules, exception handling, authorization rules, model code (business logic) per state, and view code (Java server pages (JSPs) per state in an XML-based state table.

    Check out ServletManager.

    What do you guys think about this state-table approach to web app development?

    Threaded Messages (29)

  2. Anyone using this framework before? if so, how it's compared to Struts?
  3. Hi. I was assigned to make some comparison between Struts and IBM's ServletManager. Have you got the answer to that already?
  4. Well, at first glance this is another try in the now vast family of servlet / jsp frameworks.

    Like the others, this one has some quite interesting features, like the State Table model that Floyd mentioned.
    I personaly think that this State Table is a simple but laudable try to add a workflow notion to the whole stuff. It is still very simple, but provides the basis for a workflow decomposition of some bigger processes, allowing one such process to be split into several elementary actions.

    I really do think Struts lacks such a mechanism. I know the workflow proposal on the Struts website should provide a powerful workflow implementation.

    Another think I do like in the Servlet Manager framework is the use of Listener which allows one to plug itself within the framework at some specific interception points. By writing Listeners one can easily perform custom logging, data validation/transformation... It kind of give some power back to the user of the framework !!

    Well, this was the idea I could grab from a very quick look at both the PDF document and the javadoc. Need to spend more time on it!

    Laurent
  5. Looks similar to the Oracle9iAS MVC Framework for J2EE
    http://technet.oracle.com/products/ias/ias_utilities.html
  6. The Oracle MVC lets you create the XML Service defination file from the rational rose Activity diagram. It provides the scripts that run on the AD and gives you the XML file. Now you have a framework and as long as the process names you define match those in the xml file the engine is able to call these process and pages. You have to set the transition conditions that the engine looks for.
    How is this compared to other Frameworks ??
  7. Okay listen. Oracle's MVC framework is VERY good as it really understand the concept of workflow and tools integration. And it has been way ahead of the curve in terms of simplifying development of web applications. Similarly, Oracle's BC4J really understands the issues behind O-R mapping, and has been WAY, WAY ahead of curve there.

    HOWEVER.... Neither of these are open source. Neither of these has Oracle shown willingness to open up to the broader community. While Oracle has internally been debating opening both these up to open source and community input for YEARS now, it hasn't happened and the attitudes of Oracle management have not changed.

    UNTIL Oracle wakes up, Oracle M-V-C and Oracle BC4J will NOT be accepted by the broader community, will NOT have community momentum behind it, will NOT serve as a community leader, and will NOT be used by the vast majority of developers out there. PERIOD!

    Oracle has the potential to be a real leader in this space. The products are DAMN GOOD! But until Oracle senior management realizes the TREMENDOUS VALUE behind being percieved as the benefactor behind widely adopted community projects, these projects will remain little pets of Oracle without any real vision of their own and will be rejected outright by the broader community outright.

    WAKE UP ORACLE!
  8. re. XML configuration files...

    I've architected/designed/developed a few Struts applications now, with two of them being fairly complex (the first one had approx. 60 web pages, the current around 150 both with similar numbers of Relational Tables). Using our development model this translates to approx. double the number of Action classes to pages. While I've worked on much larger mainframe/unix systems, these are the largest Servlet / web applications I've worked on and I don't find the XML configuration file to be much of an issue - I quite like the abstraction of navigation from the code. With tools like Camino (a graphical/GUI struts-config.xml builder) now available it's very easy to prototype / manage the navigation and workflows.

    In all large projects (ie. anything above 30 screens) you always have configuration management and version control issues - the only way to manage these properly is to have good change management procedures and force programmers to document all things they change. The main issue I find with java/web applications is impact analysis - I use two old mainframe techniques to manage this - ie. 'diff' and 'ieb-eyeball' - these aren't particularly sexy tools, but they are reliable. I am hoping that as the java/XML technologies mature there will be much better tools available for impact analysis on xml files, etc..

    Looking at the IBM offering, the idea of listeners / exit points to the controller are a great extension and something that Struts needs (there's a lot of things that we'd like to put in the controller but have shy-ed away from for maintainability reasons - eg. custom security checking, standardised entry/exit point logging, SSL switching, etc). Exit points would solve these problems.

    Still, I have to agree with Doug's posting above, if the code isn't open source then you're only going to appeal to the most loyal of your own customer base - given IBM & Oracle have around 30% each of the market, I also can't see the Oracle/IBM frameworks getting much penetration without going open source and removing the proprietrary classes..
  9. Regarding Don's post referring to proprietary classes and
    in defense of Oracle9iAS MVC Framework, the framework uses
    standard Java interfaces and there are J2EE compliant
    implementations to those interfaces. It also offers extensions to those classes to support proprietary
    technologies but it is entirely your option as to whether
    you use those extensions or not.
  10. What are the plans for releasing the code?

    At the very least, the JavaDoc needs to be given a little work.

    I looked at the JavaDoc and the PDF but did not deploy the .war demo.

    I'm not a real big fan of doing so much in XML ... I see what it buys you and all in terms of the coolness factor, but it seems like it invites some pretty painful debugging at runtime when you could have solved it at compile time if more was in Java.

    And after all, in the real world, for real environments, you have to conduct a real build when you make changes.

    I must be missing something because this is the same complaint I have with Struts. Can someone please enlighten me on what keeping all this stuff in XML is accomplishing?
  11. This sounds similar to the MVC Controller that comes with BEA's WebLogic Portal 4.0, called WebFlow. It allows you to decouple your pages from each other (you don't have to hardcode one JSP to another).

    But WebFlow is a bit more (and IBM's tool may be, too). WebFlow allows you to plug the events in your workflow into specific business objects, allowing you to decouple pretty much everything. That to me is the big advantage, the "Session Pipeline" basically a session object that travels over the WebFlow framework that each business object can tap into.

    Steve
  12. I totally agree.
    At our company too we have been using a home built Framework which relies on a couple of XML Config files. My observation after having build a large commertial application using this was that the debugging of code becomes extremely if we move a lot of things out from code and into xml files.
    Combined with this I have also seen that the xml file itself becomes too large to manage if the project is big and the supposed benifits of having your navigation logic not present in code but in xml files only means that you end up limiting yourself.

    Even if you look at struts, though I haven't really developed applications using struts from what I have seen navigation from one page to next is specified in the xml files. That means for each situation that you might want to redirect to a different page you have to make an entry in the xml file and sooner or later the file starts becoming a limitationa and you start telling yourself that this was so much simpler to do through direct code itself.

    Also I believe that XML should be used to transport data across hybrid systems rather than as config files.

  13. Hi,

    I've some experience as well implementing something similar for a project I worked on.

    Instead of working with one single XML file, it is often better to work with a set of XML files - sort of like a repository. I daresay a JNDI interface to the repository would be interesting as well, though that was never part of this project.

    My personal experience has been very rewarding. Designed well - this lets you reuse a lot of code within the application at different layers (presentation, business logic...).

    This IBM version might prove to be very interesting. I just wish there weren't so many frameworks out there in this area of application development.

    Sandeep Dath
  14. I think struts finds a decent combination of both. The XML file (like struts-config.xml) is simple, you can still make this very reusable. For example, I have many places in my current project where I need a UserListAction as a part of various workflows. This only requires one Struts entry. Even within an action, you can have multiple actions using logic or a DispatchAction framework. And forms used in both request and session can be reused in a similar way as well.

    The downside is that there tends to be a lot of code in the controller servlets, and the flat dispatch model can be a pain.

    The biggest pain is still docs for most of these things. I didn't even know about the Struts DispatchAction until halfway through my current project. Could have saved a lot of trouble/code in my action classes.

    The IBM framework seems to put a lot more emphasis on the XML configuration. Nifty, I think, in theory. But can get a little difficult. On the other hand, I'm speaking without real knowledge, since I haven't tried it yet.

    So little time, so many frameworks. Where do I begin.

    -Newt
  15. I respectfully disagree. Here are just a few reasons off the top of my head:

     - Using XML gives you a way to decouple your components from the workflow of your application. It also allows you to provide logical naming or aliasing. I don't see how this limits you. On the contrary, it gives me much more flexibility. Even so, most frameworks (including Struts) that make heavy use of configuration files do not prevent you from coding forwards directly in your classes (usually bad practice).
     - XML files do not have to become large. Struts, for example, allows you to define multiple configuration files for a web app. This basically allows you to break up your "big mama" app into subapps, which is critical (in my opinion) for large projects.
     - I will agree that managing these configuration files by hand can become tedious and error-prone, especially for large projects. However, tools are well suited for managing configuration files and their relation to classes. They are also well suited for validating errors and bad practices before compile and deploy time. Of course, you will only get this type of support for popular frameworks like Struts.

    You might want to give these types of frameworks a chance. Instead of basing your experience on a home-grown framework, you may want to take Struts, WebWork, Tapestry, etc. for a spin. You may also want to try out any tool support that exists for them. And don't be afraid to voice your concerns with the community that develops a particular framework you are interested in...

    Regards,
    Bill
  16. why not just use struts?
  17. I have been working on a similar idea for some time on an open source project. The idea is to let a designer create a standard statechart to describe the UI, and have the framework ensure the UI never leaves the chart.

    I think it is a very good way to design and program. As a little bonus, it works with Swing UIs as well as servlet/JSPs.

    Details at http://sf.net/projects/jstatemachine/
  18. Divide and Conquer

    Microsoft must be chuckling about this, how about everybody including SUN get behind developing ONE world class open source framework rather than the plethora that exists.

    The same goes for the NetBeans vs Eclipse stuff, or am I just missing the point!

    I hear that IBM are to release a wheel next week and it's ROUND!

    John
  19. How about everybody including SUN get behind developing ONE world class open source framework


    Do you really think that if there is more developers and more mindshare, something better could be archieved? I don't. How about joining Windows, *NIX, VAX, MacOS etc. together and create the king OS. I think not.

    You are talking about reinventing wheel... of course people are reinventing wheels because they are not satisfied with existing ones.
  20. I agree that there are an awful lot of MVCish frameworks out there ... I also agree that its a necessary evil. In the next year with Java Faces and JSTL coming out, there will only be more ... I'm sure that as .NET matures something similar will happen (I'm not a zealot -- let's not start a religious thread please). I think that this is because people aren't 100% happy with what is out there. Also, let's face it, developers are famous for wanting to engineer everything ... focusing merely on app logic gets boring ;)

    I might just be an idiot (likely), but why isn't their more focus on the App Tier? It seems like everybody is creating Web Tier frameworks.

    I think that a lightweight abstraction of EJB and JMS would be extremely helpful. I haven't looked very hard for this ... what is available today? What projects are currently going on? Are any of them any good (my definition of good = straightforward/not over-engineered/relatively type-safe/decent API)?

    Thanks.
  21. I'm sure that as .NET matures something similar will happen (I'm not a zealot -- let's not start a religious thread please).


    I'm not up to date with .Net, but I think in that case you have only one framework, you either follow that way or you have to work hard for workarounds. Generally MS is good at factoring in the most common use cases and makes the developers life very easy by hiding all the complexities, but once you have to do something differently it's damn hard.

    So, I think the proliferation of web application frameworks is good and has to do with freedom of choice, as well as it stands prove of the platform's flexibility.

    Tibi
  22. I might just be an idiot (likely), but why isn't their

    > more focus on the App Tier? It seems like everybody is
    > creating Web Tier frameworks.

    Perhaps because the App Tier is really good standarized by the J2EE specs and the design patterns that are very widely used and accepted?

    Regards,
    Merg
  23. You mean as opposed to MVC in the Web Tier?

    Sure, most people use the command pattern, but I don't see how the app tier in J2EE is any more "framework ready" than the Web Tier is.
  24. It looks like I am idiot too.

    What if I have not only http clients but also SOAP(nearly no probs),WAP,RMI/IIOP or other. It means I store session state in session beans and have all my application logic there (I can change it in one place, not in every client). Every client has his own views, actions and action-state-view logic, but state and application logic is in one common place- session beans.
    I think EJB tier standart enough to have framework covering such a case or?
  25. Divide and get market share[ Go to top ]

    "Microsoft must be chuckling about this, how about everybody including SUN get behind developing ONE world class open source framework rather than the plethora that exists."

    {a little out-topic sorry}

    Java is winning the Java vs. .Net battle just because java have diversity. Everyone is free of choose the implementation that fix their needs, or design something really new and cool, and MS is left behind just copycating... ( Ant->Nant, JUnit -> NUnit ) sooo .. whoose the leader here?
  26. <quote>
    The same goes for the NetBeans vs Eclipse stuff, or am I just missing the point!
    </quote>.
    I don't see a conflict/confusion or weakening of Java/J2EE by having multiple IDE's, multiple frameworks etc. Each framework/IDE has it's own approach and satisifies a particular need. Pick and choose what fits your needs best.
    Look at Linux and BSD. Both are variants of Unix and open source and are used quite widely. I don't see any evidence of one having hurt the other.
  27. Java wannabe C# comes out
    Netbeans wannabe Eclipse comes out
    Struts wannabe ServletManager comes out...

    All are natural progressions as I view from my deck chair on the H.M.S Beagle.

    I have been using Struts for a year and I see the value in coming out with something, on the web tier, that goes beyond Struts' request-scoped bias. I would probably stay with Struts (MVC Type-2) just because it forces me to design presentation independent workflow manager beans that I could more easily move over to another presentation framework if needed like SOAP or Swing. One day, one day! java will get a foothold on the desktop.

    One trend I see, and this is just me, that scares me about IBM after working with Websphere, Weblogic and JBoss deployment descriptors is the relative complexity of IBM's XML that ties you to their development and deployment tools. Just an observation. Adding complex workflow business rules to XML with validation is going to need a beefy editor. Where ya going to go for that?


     
  28. I like the concept of the state-table.

    I think the pdf document that describes this framework is worthwhile reading in that it presents a good analysis of the problems with state and flow management and a good description on how they came to their design decisions to deal with them. I think developers can make a reasonably quick decision if it is the right approach for them based on the authors perspective on the problem and solution.

    This thread clearly demonstrates how frustrating it can be to be involved with a boundless technology such as Java, I know I hesitate to click on theserverside link because I am about to realize that I am not done learning.

    I sure hope Microsoft is laughing at the Java community it will make me feel more secure as a Java developer. I know however that at least the top minds in Redmond are cursing at every new advancement that comes out of the Java community, and every new effort asserted by IBM, Oracle, BEA, etc.., they realize though we in the Java community all play with different toys, we all play in the same, very creative sandbox and in Redmond they play in their own (and watch us to see what to do next).

    I vote for progress.

    KJ
  29. Struts is better than JSP. But this because JSP is a scripting language and is complete and utter rubbish. But they had to fight asp.

    So this is IBM, responding to open source (struts) responding to JSP rubbish (SUN) responding to Microsoft.

    So we are all dancing to the ASP tune. Ta Daaa!

    Jonathan
    ps What was ASP in response to? Or did microsoft do something original? Hmmm, asp responding to perl? Hmmm.
    pps I had a serious point, but this is better.
  30. Err, Struts _uses_ JSP.