Good Stripes tutorials / examples? [closed] - java

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
The company I just started working for is using Stripes for parts of its web page development these days, and while it seems to be a nice enough web framework it no one really uses it-- it is almost non existent on the 'net. It's not even first in it's google search and the result you do get is for its old home page.
So, do any of you people use Stripes? Of your own volition? Do you know of any good tutorials / examples?

I recommend checking out the book referenced by jko:
a book from The Pragmatic Bookshelf called Stripes: ...and Java web development is fun again
Whilst still in 'beta' the book covers everything very well.
Another good place to start is this ONJava article.
I have used Stripes on a few projects now and have liked it a lot.
It may sound crazy but the Stripes quickstart and sample application documentation on the website does a pretty good job of covering the bases.
This is helped by the fact there is little to Stripes, probably because it is relatively new and not trying to be all things to all people. I would say give the quick-start a try and if by the end of it you are unsatisfied look elsewhere. At the end of the day you and your company have to be happy (and productive) with what you are using irrespective of how many people are using it.

I've never used (or even heard of) Stripes.
Regardless, there's a book from The Pragmatic Bookshelf called Stripes: ...and Java web development is fun again that may be worth checking out. You could also check out the Stripes mailing list archive.

It's a shame that some people perceive Stripes as a framework for which "there really just isn't much support or information for it." In reality, the Stripes community is very supportive - have a look at the mailing list and you'll see how friendly and responsive people are. In fact, some have said on the #stripes IRC channel that they have had better response for Hibernate-related questions than on #hibernate itself!
Give Stripes a good, serious look instead of dismissing it because of misconceptions.

Stripes is a great framework. We converted a major project from a home grown framework to stripes and it took less than one week.
The book referenced above is a great resources, as is the mailing list.
There's also an active irc channel #stripes on freenode.
It's a very powerful framework that doesn't get in your way.

We considered it when we were looking at open source frameworks. But we saw the same thing your did that there really just isn't much support or information for it. You should always weight the community support factor surrounding open source projects before picking one. (which is what you are doing here)

Related

Practice your micro-architectural skills [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I've googled a lot and can't find what I look for.
I look for some architecture practice. I mean there are a lot of books about Design Patterns, but I want something like analysis of common mistakes in architecture of EE applications. All I've found - antipatterns like string concatenation or something else that can be found with help of FindBug or Sonar.
How I figure it out:
Book with next steps: task definition, wrong decision, why it is bad, right decision.
Educational resources. I heard there are such resources for testers. Some applications are opened for testing and each who want to learn testing can test it; and after some period discuss own result with other people or see the percent of bugs he has found.
Maybe other ideas?
Why I think Design Pattern books are not suitable for me:
A developer may know many design patterns from such books, but can be incapable of selecting the correct one for the specific situation. IMHO, this is because these books don't give you any practice, and fail to educate the reader as to which design pattern(s) should be applied to any situation. Those books just get you a ready solution.
EDIT:
There aren't any answers any more. So I want to expand my question:
I believe, no I'm certain that exist courses dedicated to improve architecture skills, show the common mistakes in designing of web applications and so on. Also I know that there are a lot of conferences linked with this subject.
Advice me where should I look for them, please.
Holub on Patterns is a fresh and interesting perspective on design patterns.
Lots of code. Lots of pro and cons, very hands-on and practical. I learn something new every time I re-read it.
It has been my go-to book as the "next step after GoF and Head-First Design Patterns". I love it, and it has been very well recieved by the ones who have tried it.
Can I assume that you know how to create independent objects using Dependency Injection? If not, this would be an excellent are in which to cultivate reuse and create a more robust architecture. Using DI would be an excellent way to re-architect an existing solution. (Contrast that with much evolved code, which becomes brittle because of interdependency.)
While you're not looking toward Design Pattern books, I'd ask you to glance at Refactoring to Patterns by J. Kerievsky.
Kerievsky takes you through some real-life refactorings which have titles like "Move Creation Knowledge to Factory." (It's "real-life" in that he uses actual code, not a contrived example.)
Finally, I have been encouraged in our recent use of Spring Integration as an Enterprise Integration Pattern. If you architect and implement even a modest project in Spring Integration, you'll get quite a lot of experience with both DI and EIP.
If you're writing enterprise applications, I'd recommend Patterns of of Enterprise Application Architecture when you're done with the basic design patterns.
It was written about ten years ago and some of the more modern things about how to shard tons of big data across cheap servers you will not find in there. The cloud did not exist when it was written. But it seriously discusses a lot of things that you won't find discussed elsewhere, and coins names / patterns for elemental building blocks of applications. I'd call it a classic rather than old.
See http://www.martinfowler.com/eaaCatalog/ for an index of the patterns that are discussed.
In my experience, the role of an architect is defined differently for different companies and often has less to do with code structure and patterns and more to do with your business requirements and practices. Employers seem to be more interested in what systems you might integrate into your solution or how you expect to interact with varous customers under conditions imposed by your company.
Correctly using a DI framework or design patern is something ever programmer should be able to without specific guidence from an architect, but researching and choosing which DI framework to use that might best fit your task is something an Architect might do.
They also tend to do more advanced impelementations--One of the better architects I worked with implemented the more difficult parts of our system, he wrote a custom Java classloader that loaded classes from a database and designed how it interacted with a GUI builder he designed so our customers could edit a GUI with Drag and Drop and we would save a .class file into the DB so it could instantly be loaded by all the client machines hooked to that server.
Some companies have different definitions than others--a company I worked with that did set-top cable box software had some architects that hardly programmed or had anything to do with software design, they were responsible for things like decomposing communication protocols and interacting with customers to help understand their problems (I viewed this more as Analyst work than Architect, but it was much more technical than most Analyst work I've encountered)
I guess I'm saying that an awful lot depends on the company you are working with. I suggest you go to your manager (or an existing Architect) and tell him you are interested in such a path and ask how you should progress.
When asked pretty much this question, one of the Architects I've worked with said that it's something you are always working at--you don't study up and finish, keeping up to date all the time on as much as you can is your new job--Where others might read a book or play a video game, you should be reading articles about software design, installing and playing with new software languages/tools/libraries and learning more about the specifics of your business.
In my views what I think going through the Class Diagrams of the Design pattern will help you a lot.
What more i will suggest is to take a brief of the Book "Head First Design Patterns". As per my experience this book has some very good example related to every Patterns which will help you in the pattern selection.
As per the selection of Design Pattern is concerned you can develop it by implementing more and more pattern in different scenario.
Take a look at Adam Bien's book
Real world java EE 6 Patterns
You can download an introduction based on this book at java.net
Real world java EE Patterns (pdf)
The first step is learning general good practices for developing applications. Knowing design patterns is very useful as it is a type of a language, so if you call something a "Controller" or "Request/Response" that automatically tells other developers the patterns you are applying and how to use it/work with it. Also, large software is typically built using them, so you have to know design patterns. Doesn't mean you need to squeeze every single one into every application, just saves you the trouble of solving problems others have already solved. As far as best practices at code level, Sonar is a good code analysis tool that taught me tons of do's and don't's.
Second, you need to narrow down the context and determine what types of applications are you planning on architecting. For example, web applications have different architecture from embedded applications, if you specialize in one you don't necessarily need to know all the ins and outs of the other.
Third, read up on Enterprise Integration Patterns.
Fourth, do hands on work with Apache Camel. It's a Java enterprise integration framework, great documentation and really easy to get up and running.
To me design patterns look like solutions to isolated problems. In real practice we have to deal with combinations of problems, which are highly dependent. I have never seen any pattern used purely. I can recommend one book which gives a wider view of software architecture: Domain-Driven Design: Tackling Complexity in the Heart of Software. It says how to approach to software design, instead of giving a set of common tools. With some examples it explains how to solve a set of problems in combination.
One more book gives an explanation on how to design classes and their collaboration: Interface Oriented Design: With Patterns. To write good understandable and maintainable code. It explains a lower level approaches rather then DDD.
My two cents :)
I agree with your observation that simply learning design pattern is of little consequence. A typical thing which generally occurs after learning design patterns is that the developer tries to map the a ready made solution (pattern) to a problem which is not the right way and will create more problems than what it solves.
IMHO, being an architect is more a matter of experience than academics. An architect is at core a Problem Solver or Solution Provider. By problems, I mean the large scale design problem and not the day today programming problems.
The problems could be from whether to use OR mapping tool or not to larger and more profound problems like whether to go for SOA or not and likewise. Its not about WHAT to do but HOW to do.
These things are a matter of experience. A problem can be solved by thousand different ways but while designing a system, due consideration should given to technical feasibility, performance, scalability, deployment, maintenance, extensiblility and many such non-functional requirements. Now unless you have been-there-done-that, its difficult get hold of these things which are very vital for today's software system .
Nobody can deny the importance of books(apologies for not introducing to new books as people here have already suggested wonderful books). They are written by very intelligent, sharp and most important experienced, people. I view this as a way of sharing once's experience and view point and they help you in chalking your path.
Apart from books, the other very important way to understand or learn about system design is ability to dissect the existing systems. For example, you might want to explore how a typical web server like Tomcat works or a DI framework like Spring works. Open source makes these things possible.
The best single way to be a great software architect, developer, or programmer is to work.
Get the basics down, and then work on something - especially something you are interested in. Hard work will pay dividends in the form of experience.
Surround yourself with people smarter than you, and listen to what they have to say. Trust that their experiences can help lead you into a better understanding.
Wisdom is not something that can be bought with a $50 book, or even a $100K college degree. Software craftmanship is something that you must earn.
If you have free time, working on a popular and successful open source project will help you gain great experience.

Should i use play framework or normal Java EE [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Am planning to start a website that I will use commercially. I recently have heard of the Play framework and it looks good. But am not sure if I should use it or not. I know java, jsp, servlets and struts 1.
I don't know how stable that framework is? Should I go with a native Java EE application or should I use Play?
If you want to have a rapid return on investment play is your friend.
Within days of using it you can get a web site up and running (which even for an experienced Java EE developer is a bit of a challenge). I think you need to balance you requirements with the advantages of play.
Check this interesting post: https://stackoverflow.com/questions/5376732/what-is-pro-and-contra-of-using-play-framework
Play is always gaining more momentum and there are already a few commercial websites using it http://www.playframework.org/community/testimonials.
I would also add that play is fun to develop with which will also add to your productivity!
Play is stable. It now has some big reference sites, including the guardian.co.uk and more and more sites are springing up all the time. It is very easy to develop in, has its own dedicated hosting service (if required) and has a very active community.
As for whether you should use it or not, is too subjective a question to answer fairly. I use it, and would always now do so over a Java EE application, but my needs (quick, clean, not bloated) may not be the same drivers as yours.
I would suggest doing a proof of concept in both technologies, and see which one suites your needs the best. If you cant afford the time to do a proof of concept, maybe you should stick to what you know?
Play does indeed look nice and clean. From my experience using any new framework will bring its pros and cons. Play might be buggy, you seem to know Java EE. It really depends on what you want to do and how much you're willing to invest in learning something new.
In my opinion it is always possible to transition to some new way of delivering your site content. It's healthy to keep experimenting with new frameworks, but wiser to build business on a framework you know. That way the bottleneck wont be the technology.
Part of the answer is in the answer to the question: What is the purpose of this website?
Personally, I would stick with more well-used frameworks like Java EE (version 5 & 6 have a LOT less cruft than the older versions) or something like Spring or Seam. If you are going for a simple site, maybe look into JBoss Seam.

Is the stripes framework dead? Anyone using it? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I am a big fan of the http://www.stripesframework.org and using it heavily for my projects. However the project seems to be dead. It is not possible to register to the website anymore (no license) and I couldnt contact any of the administrators. Also the mailing-list is not available.
Is anyone aware of the status of the project?
It would be a pity if it was dead as I think it is one of the most elegant frameworks for java web development.
We're using the Stripes Framework on a large Java project. The Stripes project is actually very active. 1.5.4 should be out soon, and the mailing list is where most of the communication takes place.
The website is pretty old, but if the #1 failure of the framework is in marketing itself I don't think that's the worst thing that could be wrong with it. If you'd like to contribute by helping out with a site redesign the planning is going on now.
The mailing list is a great place for questions, and the irc channel #stripes on freenode is pretty active during business hours.
The framework does what it's intended to do very well. There is discussion on new features, but I think a lot of people are happily using it as it is.
Just to note we use Stripes with Spring for dependency injection it works very well.
Not at all, The Stripes Framework is activly developed and the mailing list is very active. Information how to subscribe to the very active Stripes mailing list can be found here:
http://www.stripesframework.org/pages/viewpage.action?pageId=511
Or go directly to the Stripes mailing list # gmane.org:
http://news.gmane.org/gmane.comp.java.stripes.user
Stripes is the main Java web framework choosen in the company i'm actually working in.
It is used on many websites here, including medium sized projects like the french Renault and SFR websites (both ~40 people teams).
Everybody here quite like this framework that integrates nicely with Spring (IoC, Security).
As ScArcher2 said, you can come to the IRC channel #stripes on freebode, it's active with an average of 15 people here (mostly USA business hoursi noticed), including Frederic Daoud who wrote the Stripes book and Ben Gunter, Stripes commiter, and some other people that will be able to give you some advises or friendly discussions.
Stripes documentation is not exhaustive (imho) but it's easy to look at the framework's code and see how it works internally. However if you need help to do something you will find that on the irc channel
The bug fixes comes relatively fast, not like some other projects like Hibernate where some bugs can remain for many years.
Btw if you really like simple Java web frameworks, you should also take a look at Play!
I agree with you. Stripes is also one of the best framework in java. Unfortunately some people have no knowledge on this frame work. so that they are using struts ..etc.....Coming days most of the companies used this framework.
http://www.stripesframework.org/jira/browse/STS?report=com.atlassian.jira.plugin.system.project:roadmap-panel
Still alive I believe. 1.5.3 just made it into maven central, and they're working on 1.6.
They sure could do a better job of updating their main site though.

Topics for Java course [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm in the process of putting together a year long PRACTICAL course (not academic) to produce Java programmers who can be productive from day 1. I've found that often computer science university graduates know all about the Fourier transformation, but as interesting as that may be, doesn't help me integrate them onto real life projects.
Apart from obvious programming I have thought of a number of other topics
Testing
Continuous integration
Source control
What to do if you have a problem (e.g. this site)
Agile and other methodologies
Documentation
If you can think of any others please let me know.
debugging techniques
The theory that's probably necessary:
How to sort an array with something that's not O(n^2)
The very basic data structures; array, list, tree, stack, queue, heap are the first to mind.
If not how to write them, then absolutely why you'd use a tree over a list over an array, or vice-versa.
The practical knowledge that's also necessary:
The book The Pragmatic Programmer covers most of what you're asking here.
Eclipse. How to work a debugger. How to work a profiler.
Ant.
Some basic web framework; Struts, Spring, etc.
Apache Commons, JAXB, a SOAP library, a REST library.
How to read bad, uncommented code. How to refactor it bit by bit to be maintainable.
What a good comment is.
HTML, CSS, JavaScript, JQuery, in that order.
Validators (W3C), formatters (Jalopy), checkers (PMD, FindBugs).
How to use a piece of Bug Tracking software; how to write a good bug description, how to explain what you've done to fix it, and how to handle user expectations.
Actually, that deserves it's own line; how to handle user expectations and conflicting timelines and goals.
You need to teach them how to:
Read other people's code for comprehension
Work within a legacy code base (the steps, from reading to building to running tests to modifying)
In addition to what you have, working in teams on a mid-size project. This will also (hopefully) help them see the benefits of source control, testing, and documentation.
Another answer mentioned debuggers. In the same respect, I would also give an overview of profilers.
One thing I wish my professors covered more in my programming courses was using IDEs effectively. My professors mentioned that we should check out Eclipse, but never really taught us how to use it to its full potential. Even now I frequently find new features of my frequently used IDEs that save me a LOT of time doing trivial tasks.
Once you get past the skillset needed to be a coder, I think the next step is learning to code smarter and not harder.
Code reviews.
Receiving and giving code reviews is not very easy and quite often people get annoyed quite easily, especially the one whose code is being reviewed. But it is very useful to be forced to take on criticism and to explain your decisions. For the reviewer it requires you to read other people's code and to be able to point out the problems in it and of course to describe why you think the developer has done something wrong.
I'd dedicate a fair chunk of time to UML and pseudocode design. Writing a quick spec or even a few lines of pseudocode takes some practice and has tons of benefits.
Another thing I'd recommend is build procedure. While this stuff varies from place to place, a primer on things like Ant, continuous integration, etc would be great.
Sounds like you want to teach software engineering more than Java. You have covered most of the main topics however, I would suggest the following as well:
Software Architecture: There is design and then there is architecture. Understanding how different components will/should interact in a project is important
Requirements gathering: Getting the actual spec from the "business owners" is a valuable skill. Too many people think that actual requirements for a project will just be given to them.
JDBC/Databases: You have to touch on databases if they are going to be useful on day 1.
MVC: I don't think it is important to go through all design patterns however, it is definitely worth mentioning MVC. It is an incredibly important pattern for Web development and really can be applied to most anything.
1 year is not a lot of time to turn someone into a software engineer. There is a lot of practical experience that has to be developed and generally speaking, that is why a Bachelors is 3-4 years.

how to choose an open source library? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
when every one of us program in java he would need a library (some jars) to complete his work .
so when this programmer find some libraries he need . how he can find the best of these libs ?
thanks.
I don't program in Java much but I do need to hunt down libraries for C++ and Python, which are my mainstays.
I think some criteria you can apply to stuff you find on Google or community sites like SO and java.net include the following:
How well documented is the project? Is it just API documentation? Does it have samples? Are they documented or just spat out? Are there tutorials?
When was the last stable/unstable/testing release? Do version control logs indicate activity in the project? (Google Code projects have a indicator on the right side of the page which shows project activity) Are their mailing lists active? Do a lot of people ask questions and questions get answered? Are developers talking on their mailing lists?
Is the API to your liking? This is both a matter of personal preference and objective measuring. As an example, for C++ GUIs, some people like the API of wxWidgets more, whereas some people like the API of Qt more, and there are people who are more productive in each, but there are also good reasons to believe objectively why one is better than the other API-wise.
Is the project "famous"? This is kind of iffy because it relies on groupthink, but there is some merit to considering projects based on how "famous" or "well-known" or "widely-used" they are. It helps because this is normally an indicator of reliability (emphasis on normally, i.e. not always). The communities will probably be more active and knowledgeable. You can tap onto existing programmers who are already probably familiar with these APIs and hire them or recruit them, etc. For example, I suppose that other than being generally quite good, a lot of people go for Lucene as their text search system because it is very widely used.
How mature is the project? Is it in alpha? Beta? Pre-release? Sometimes you find a library you really like but it's very raw. Depending on the nature of your project, you may want to reconsider using it.
All that said, generally good places to find good Java libraries are probably projects from Apache and those published by Google.
This is all I have for now. Take them with a pinch of salt. If I have anything else to add I will edit this post.
Hope this helps!
I rarely need additional "Generic" libraries. If that's what you are after you might keep an eye on the Apache stuff--there are a few groups like that that just do generally good work, but most of the stuff you could get in a general library like that you can write yourself just as quickly as you can learn to use their stuff.
Occasionally I need a specific library like an SNMP library or something to provide a specific service--these are actually NEEDed because rewriting them would be prohibitive. These are much more important to choose correctly, but generally there aren't so many to choose from and a co worker will almost certainly have some experience or opinions if you don't.
Researching stuff like this should be a scheduled part of every project--the need to do the research should be identified in the early phases of the project.

Categories