I'd like to learn a bit more about jBPM and how I can leverage it within my JBoss Seam-based application. I've taken a look at the documentation, and written a couple of basic test applications to get comfortable with it, however I'd like to learn a bit more about best practices and real-world scenarios using jBPM. Does anyone know of any good resources for finding "jBPM recipes" or real-world examples? Things like a user registration system for a website, trouble ticketing, eCommerce order processing, etc. I'd like to see how other people are structuring their business processes to get a sense of what to do (and what not to do) when using jBPM.
Look at the DVD Store example application in the seam bundle. That uses jBPM. You can also find other jbpm projects in the example folder in seam.
Related
I'm involved in a project at the institute where I study that consists in build an thematic online dictionary. I'm thinking in make it from zero, constructing an MySQL database and using it with servlets and jsps. I'm not professional and that's my first experience with a real project, so I'm afraid that this way may, in the future, cause problems such as difficulties in maintenance, for example. I know that there are many CMSs, but I would to use this experience to put all my theorical abilities in practical. Yes, I've time to waste. What I need to know is: the fact that I don't know things like Struts or Spring precludes that I make a functional system?
Thank you.
If you are willing to learn new technologies and break you head for a few hours in the beginning learning and applying it, then no, not knowing spring or struts does not preclude you from creating a functional system. Maintenance is a whole new ballgame/discussion. Even the best programmers in the world cannot create a zero maintenance system. The only thing you can do is learn the system well enough (and be prepared to make the learning on going) so that you can put in the best guard rails around it and also be able to debug issues. Now, if this system that you are planning on building needs to be a professional grade system, then I would recommend hiring/getting someone who has built web applications in the past and can maintain it. That person can help carry you until you can take over. If this is a smallish project which can live with a few initial issues/downtimes (which you can work on to improve), then I say go for it.
The best way (IMO) to learn is to take a sample application, deploy it and start reading code. See if you can trace the request from the browser (I am assuming your application is a web applications) into the framework, to your controller/models and back to the view. Grab a sample spring mvc application (for e.g. http://static.springsource.org/docs/Spring-MVC-step-by-step/) and see if you can make sense of it.
I am student. Currently, I am experienced with Core Java and very introductory Servlets and JSPs concepts.
For my summer internship, I have a task at hand where I am to develop a social CRM for a small startup.
I am very new to web development, I have no prior experience in this field, I am familiar with the technologies involved though, however I want to start off now and develop a good project in the summers.
I want to base my project on Java, I am considering using GWT for all client side AJAX work along with a J2EE server.
Would this be a right decision on my part? What is the learning curve involved with GWT? Can I really start off with something like a small CRM without doing nothing more than a HelloWorld previously?
Need some suggestions as to how should I kick start my work and progress quickly with concepts and my project as well.
If you want to develop a good project, like you say, then I believe this is a very fine choice. It's certainly not the easiest one (you could probably hack something quickly with PHP etc.), but I'd say that it really pays off.
I would suggest to follow the official tutorial and the remainder of the official documentation (stay away from the "Editors" framework for now though, it's madness at the moment.)
If you already have a solid background in Core Java, and if you get the right picture of how GWT works (eg which code is transformed to JavaScript / when HTTP requests will occur / ...) I think you can absolutely do it. Make sure to get some solid HTML/CSS and a little bit of JavaScript background first.
I must add, that I would personally not go the Roo route (sorry #jgrabowski) - especially not at first (probably not ever, even though Roo is probably a very good tool, if you like such tools.)
Understand the GWT technology,
create a few very simple prototype apps (just for fun),
then learn to apply best architecture practices, and improve your code.
And maybe you'll find, that a different architecture may even work better for your app (Just as an example: In the case of the largest application I'm currently working on, the generally-suggested MVP architecture would simply not work very well, at least not the way it's usually presented. So it's sometimes better to form a good solid understanding first, instead of blindly copying "best practices". Then you can make an informed decision, and develop a good project!)
You can start playing with Spring's Roo and generate GWT skeleton of your application. Then you can analyze it, try to understand it, improve it (and even remove Roo from it afterwards:-).
Roo is able to generate well architected GWT application that is inline with current best practices, so I believe it might be good start for you.
Found an excellent source for exploring GWT in depth.
I would stronly recommend the book "Google App Engine Java and GWT Application Development", as of now the book is quite updated on GWT, GAE and the APIs.
https://www.packtpub.com/google-app-engine-java-and-gwt-application-development/book
In recent months the GWT Activities and Places pattern has matured.
The example covered at http://code.google.com/webtoolkit/doc/trunk/DevGuideMvpActivitiesAndPlaces.html gives a broad introduction to the pattern. The downloadable sample will lead demonstrate how to 'slice' your application into Activities and Places. This pattern will take away some of your 'architecutre' concerns - you can just go with the flow and do it the A & P way.
Note, however the intro page and the demo code are very light on UI. Separate to your architecture planning you'll need to get up to speed on laying out a GWT app - but that's also covered well in the GWT articles. As #Chris-Lercher suggested, create a couple of UI prototypes that you're happy to throw away to get you started.
I work in a medium to small team ( 10 people ) developing and supporting several web enterprise applications.
We have a dozen of them built with a house-made framework with asp-classic working against ms-sql server.
We are evaluating the migration to a new development stack.
We'd like it to be open (free) and simple.
I've been looking around the java web frameworks, but all of them seem to be extremely overbloated for our needs (with the possible exception of http://www.playframework.org/, which I couldn't study yet...)
We are thinking about porting our own framework to this new stack, rather than adopting a whole new stack that we are unaware of ...
so far now, we though about the following possibilities
plain java - jsp - jsf
groovy - gsp (no grails at all)
jruby (no rails at all)
we feel really comfortable working with dynamic languages (well, as dynamic as classic asp can be) and with a lean and understandable framework...
I see no small and simple web frameworks for java, like there are for php or ruby...
I really like groovy, but I see no web implementations outside of grails... Besides the language documentation doesn't seem to be quite complete (I might be looking in the wrong place, perhaps)
php could be an option, but I think it would be hard to advocate for it in my current work...
any other option, advice, pros and cons?
thanks a lot
--
edit
some related link Can anyone recommend a simple Java web-app framework?
I'd suggest you take another look at Grails. It does use hibernate and spring under the covers, but for most situations, you don't need to know the details of those frameworks. There's a large community and lots of documentation/blogs/mailing lists for support, as well as a thriving plugin community with over 300 plugins solving pretty much any need.
If you're still put off by grails, you could look into the play framework. I don't have any experience with it, but there has been some traffic recently around it on hacker news and the like. I know it uses groovy for the templating language.
I cannot recommend anything, but strongly recommend that you consider these things:
Rapid development. Basically you want to save a page file, and reload it in the browser. Instantly! It can be done, do not settle for long deployment times.
Plain, readable text files!
Convention coding instead of explicit coding - big XML files will eventually drive one or more developers insane. The less, the better.
Good tool support (just having syntax coloring may be a big help)
Consider the long term support of your choice. You are basically remarrying with your software - will it still be maintained in 10 years? By whom? Will you have alternatives (JSR's are great - look at the amount of servlet engines)?
And WHEN you choose - get the source code for it, and ensure that it builds correctly. It will never be easier than now, and some day you WILL need to fix something inside. On short notice! (You may even consider allocating resources for donating documentation/patches/time to the open source project you are building your business on).
EDIT: A few more things:
You want to be able to verify things at compile time. One of the things that make it possible to build cathedrals in Java is that the static typechecking prevents a lot of nasty runtime errors. "Oh, THAT method? Well, it's not here, sorry. Boom!"
You want good error reporting. Built in! Try throwing a NullPointerException deep, deep down and see what 1) the user and 2) the developer is told about it. Anything that requires going to a log file to get the details WILL cause calls at 3 AM eventually.
Look into scalability from the start. Any non-trivial customer will need to and the world goes to multicores, so you might as well think about it already now. What will you do when all the magic pixie performance dust has been used and it just isn't enough: The application requires more than a single box.
And read this: http://www.pragprog.com/titles/mnee/release-it
You're forgetting about the other major player in this field: the LAMP stack (linux, Apache, MySQL and mod_perl). All components are free, there are many books available on LAMP development and each of these components, and there are vast numbers of libraries and components already available.
Apache: the Definitive Guide
Learning Perl: by SO's brian d foy
Practical mod_perl
If you are afraid of Grails and need Java, try Stripes and read the excellent Stripes book (http://www.stripesbook.com/blog/). You can buy the eBook pdf for $23. The book covers the framework in amazing detail. Stripes is a very strong, lightweight MVC framework that deals with all the common problems of web development (templates, url mapping, form validation, security, internationalization, testing) but it won't automagically create the database layer for you unless you want it to by using Stripernate. You can also use Groovy with it. You can use it standalone or with Spring.
I've had great success in simple web projects using Spring MVC with JSTL JSPs. Spring MVC is a framework that can be kept pretty darn simple (1 additional XML file used for configuration). You can eschew all the fancy options and just specify a set of JSPs that you want to associate with view names, then forward to those views by specifying their names in the controller.
Spring MVC can also easily scale up and be as complex as you need, letting you switch from JSTL to JSTL with Tiles, or Struts, or JSF, or Wicket. It can also handle complex web flows using the Spring Web Flow project. But for most projects I just keep it simple -- build a JSTL JSP, create a controller that provides the objects that JSP needs, and associate them by having the controller return that view. Once you get the project set up and you're familiar with the configuration, it takes maybe a couple minutes to wire a new page into place.
If you like Groovy but don't like Grails you could try Gaelyk, which is a lightweight Groovy framework. However, AFAIK you can only use Gaelyk if you're hosting the app on the Google App Engine
If your apps won't be hosted on GAE, and you really don't want to use Grails, another option is to use Groovlets, Groovy template servlet, GSPs.
However, personally I think it's a big mistake to dismiss Grails. It really is a great framework, and you can go a long way without knowing much about Spring and Hibernate. One of your complaints is a lack of Grails documentation. I think you must have been looking in the wrong place, because in addition to all the books available, there's a very extensive reference document and a lot of other documentation available on the website. Finally, there's a very active mailing list.
My platform of choice is JRuby - Rails (3) because of its very rich and powerful ecosystem, but mainly because:
* very easy to use
* many MANY libraries
* fast support via IRC
* deep documentation
You can also check out Scala + Lift Web Framework ( imho best static typed language, nice framework )
We're embarking on a project for a client. They plan on having about 50k users by the end of the year. We're pushing to use Pylons w/ Mako and SQLAlchemy, and our contact there is excited about it, but some of his colleagues are wary because it's not .NET or J2ee (they're used to enterprisey stuff).
Their web app will have some data analysis that we'll offload as well as a twang of social networking features. (basically all they have so far is some Flex mockups for UX)
I'm looking for some evidence with regard to development time, or other reasons that will help our argument to reassure the customer.
The other options is that we're barking up the wrong tree and have no idea. I hope that's not the case.
Any references to case studies or whatnot would be nice. The best I could find are
http://www.oracle.com/technology/pub/articles/rubio-python-turbogears.html
and
http://www.oracle.com/technology/pub/articles/devlin-python-oracle.html
which are a bit dated (wrt to TG2 and whatnot)
Thanks!
If you're looking for a success story for a customer, Virgin Charter is using Pylons with SQLAlchemy for their site. This is a high-value transaction system as people are booking very expensive flights through the site.
For a more high-traffic site, Reddit is now running on Pylons, along with Charlie Rose.
SQLAlchemy and Mako were both designed by Mike Bayer (A veteran Java programmer), SQLAlchemy being based on the best of Hibernate and with the same powerful principles and patterns that Hibernate supports.
If they're wary of deploying something they're not familiar with, Pylons runs on Jython, and the latest SQLAlchemy (0.6 branch) is about ready on Jython too. This would let you package up a full Pylons app into a WAR file for deployment which would reassure their Java-types.
For general Python, consider pointing out all the big animation studios that use it, and the other various srouces S.Lott points out.
It's almost easier to build a quick Proof of Concept service that demonstrates how clean and simple it is.
A simple SQLAlchemy mapping with a quick demo of query processing.
A simple template showing how cool Mako is.
A simple Pylons app to put the two together.
Most important -- use their application and their data. Not a lame hello world; not an existing tutorial.
If they want to compare your clean, elegant demo of their app with .NET and J2EE, they'll see that other languages lead to a much, much bigger code base.
Edit
Show them this: http://python.org/about/success/
Also, one of the best Python demos is to do things the way the SQLAlchemy and Django tutorials do things -- in interactive python from the >>> prompt. Nothing is more exciting than programming which is so simple you can do it interactively.
You won't find a lot of compelling case studies. Python is a community. .Net and J2EE are products. .Net has Microsoft's advertising backing it; Microsoft can afford to do extensive surveys and studies of their product. Same for Sun (soon to be Oracle) and J2EE -- lots of marketing hype backing up their claims.
Python just has what's on the Python.org site (http://python.org/about/). The various related projects (Pylons, Mako and SQLAlchemy) don't have lavish case study whitepapers. They do have a large number of downloads, and lots of word of mouth.
But if someone's looking for "proof" that Python works better than .Net, there's not going to be much.
They are crazy if they want to use j2ee imho. Visual Studio/C# is very nice, especially if you are not trying to do anything tricky. However, if you want to customize the C# way of doing things beyond what it was explicitly designed for it can quickly turn into a mess -- you get mired in automatically generated XML configuration files &c. Of course, I also think that Pylons with SQLAlchemy might turn into a mess because they too generate so much stuff that you ultimatly might end up having to reconfigure. If you want complete control, I would recommend a less intrusive environment, like Werkzueg. Please read my essay on writing MVC with no invisible means of support.
I have a rather large (80k loc) java desktop app that talks to a database. We're now looking at exposing some parts of the database via a web application, using the existing codebase and preferably not having to modify it.
I have good separation between the data access, business logic and presentation layers, but we haven't used enterprise java beans or anything like that (if that's important).
What's the best way forward? Which of the java web frameworks will be best suited to the problem? Learning curve isn't terribly important, since I haven't done any java development on the web...
To be true, it depends what you already have, and how well is the design of your current desktop application. You might not be able to use any or may be minimal of your existing code without modifying it, if its designed badly, and everything is tightly coupled.
Assuming that you are having a system with a good design, everything is de-coupled well enough. You can look into Stripes to make your presentation for the web, and use your existing data access and business code. I wish you all the luck.
Few other goodies to look into are, Groovy on Grail, Wicket.
I don't recommend anything like Seam and Spring they are more of a container and sophisticated large frameworks, which give you almost everything, solution for almost all of your problems. As you mentioned that you already have a complete system, and you just need to make a web interface to publish it for the web, these are not recommended, IMO.
JSF, is a good framework, but it might drive you nuts and has a big learning curve, according to few folks.
The two frameworks I would recommend would be Grails and Struts 2.
Grails comes with a whole bunch of stuff that it configures under the covers including Hibernate and Spring. It makes generating dynamic pages to send to the browser ridiculously easy. What you are probably going to need to do is set up controllers that call Grails services which reference your existing code as you probably don't want Grails managing your database interactions. The disadvantage with Grails is not so much that it is written in Groovy, which is easy to learn for Java programmers, but that the IDE support for Groovy is still maturing. Still if you want quick productivity this is the route to go down.
Struts 2 offers a clean command pattern framework implementation that talks to JSPs (or velocity or FreeMarker templates) on the front end. To use this you would configure actions to call your existing code. You may want to investigate adding Spring to the mix depending on what you need to do.
There are other choices but these are two that I have had some success with.