Migrations for Java [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I use both ruby on rails and Java. I really enjoy using migrations when I am working on a rails project. so I am wondering is there a migrations like tool for Java? If there is no such tool is it a good idea to use migrations as a tool to control a database used by a Java project?

For a feature comparison between
Flyway
Liquibase
c5-db-migration
dbdeploy
mybatis
MIGRATEdb
migrate4j
dbmaintain
AutoPatch
have a look at http://flywaydb.org
This should be a good start for you and anyone else to select the right tool for the job

Liquibase is another project in this domain worth checking out.

Grails has a dbmigrate utility that is patterned after the one from Rails. Since it's implemented in Groovy, you should be able to use it from any of your Java projects.

I've used Hibernate's SchemaUpdate to perform the same function as migrations. It's actually easier than migrations because every time you start up your app, it examines the database structure and syncs it up with your mappings so there's no extra rake:db:migrate step and your app can never be out of sync with the database it's running against. Hibernate mapping files are no more complex than Rails migrations so even if you didn't use Hibernate in the app, you could take advantage of it. The downside is that it's not as flexible as far as rolling back, migrating down, running DML statements. As pointed out in the comments, it also doesn't drop tables or columns. I run a separate method to do those manually as part of the Hibernate initialization process.
I don't see why you couldn't use Rails migrations though - as long as you don't mind installing the stack (Ruby, Rake, Rails), you wouldn't have to touch your app.

I ran across this post while researching the same question. I haven't come to any conclusions about the best tool or approach yet, but one tool that I've come across which hasn't been mentioned in other answers so far is dbdeploy. I'd be interested to read any comparisons of these tools.
Some other relevant resources: Martin Fowler and Pramod Sadalage's somewhat aged post on Evolutionary Database Design, and the book Refactoring Databases: Evolutionary Database Design by Sadalage and Scot Ambler.

There are also two independent implementations of rails-like migrations for Java:
1) Maven-based migrations from Carbon Five
2) Ant-based tasks from Hashrocket (my personal favorite)
Although these packages were written for Maven and Ant specifically, with some work you can adapt them to just about anything.

Migrate4j seems like a candidate, but the project doesn't look mature enough for production usage.

There is also DbMaintain which has been initially developed inside Unitils but is now a dedicated project. We are currently using it and are very satisfied (which doesn't mean there aren't any good alternatives). I list more of them in my database+migration bookmarks (with a focus on tools supporting Maven).

Related

Which framework should I use (Grails, Java/Spring)? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I would like to create the back-end framework for my website using one of the following: Groovy Grails or Java.
My main concern is scalability/performance and the app will be able to handle large sets of data, primarily read heavy.
I will be using HTML5/JavaScript/Jquery for the front end and MySql but not hibernate spring JdbcTemplate
Any info would be greatly appreciated, I am fluent with Java and Spring and have made a few small apps with Groovy/Grails.
Edit: Some more specifications: I have to use java mails
I would suggest you to go with Groovy Grails. Simple reason, which you might be aware of as you have developed Grails application, is that Grails follow Convention over Configuration which simply means less configuration (unlike Spring and Hibernate), less time, less work and more output.
Keep in mind Grails under the hood is SPRING and HIBERNATE. So whenever you write a GORM query it would be better and optimised than writing everything yourself. Expect it to be highly scalable with very good performance if you follow the best ways for your DB calls. In any case it would be very easy to write and in the long run the Grails stuff will be much more maintainable as well.
Regarding front end, you are free to use HTML5/JavaScript/jQuery in a GSP page with lots of helpful Taglibs prebuilt for you. You might design one Taglib if needed. On the other hand even if you wish may be now or later, you can even use front end frameworks like AngularJS along with RESTful services on your server.
Regarding Java mails, you can use it or any other library in Grails which you have in Java.
Regarding your fluency with Java and Spring, it is going to take some days to be fluent in Grails but once done then in next few days you will make up any lost ground.
Apologies if I am digressing a bit, I have been a great fan of Servlet's and Spring's of the world (not much of groovy/grails), but recently did a POC on a product idea and used Play/Scala (or java) combo to greatest benefits and to summarize it -
Play! keeps you on the right track, forcing you to carefully consider your memory usage, which produces first-pass code that is practically cluster ready.
So, essentially, with Play/Scala scalability/throughput is not an afterthought rather built into the way we program on it. Hope it helps.

Using wavemaker for enterprise applications [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 5 years ago.
Improve this question
I'm starting a new web based enterprise application, and I'm thinking of using Wavemaker.
I'm a fairly experienced java-ee developer, but it seems to me that even in this case, WaveMaker still makes sense to develop the application fast and focus on the business logic.
My questions are :
1- Are their any drawbacks to this platform
2- Can I do all the normal things from the server side easily (like sending mail,building birt reports, adding jobs)
3- Can I freely manipulate javascript (for example for specific animations, using plugins....)
4- Can I integrate realtime processes, like websockets ?
Thank you
I've used Wavemaker in an Enterprise application with success. We used quite advanced features such as heavy use of backend logic based on JavaServices, an run-time SQL database selector made inhouse, JS plugins for the frontend, obfuscation etc
We later recruited a devteam to take support of this application and, although the community is small, the team learn quickly and was able to maintain the code base.
As I see it, Wavemaker is a excellent tool if you like to:
deploy a web-based CMS for your midsized SQL database
deploy a smaller web control page for your java back end system
To answer you questions:
1) Small community: Although the community is friendly and on their toes, it is too small to ensure the type of feeback you might be used to. You will have to spend quite some time banging your head to the wall when you try to go beyond the example applications.
2) Yes, you have all the freedom you would expect from a Java backend. Simply said; each REST api is assigned to a Java Method, its up to you to implement the logic. I have built wavemaker on SQL, mongoDB. With email interactions, data parsing, file upload/download etc You name it
3) Yes, you can add JS plugins and customize the scripts generated by Wavemaker. You might want to make sure that you don't edit the auto generated JS, since they will be overwritten. but as soon as you found the right entry point you are free to customize just the way you like it.
4) Yes, since you build you own back end in java you are free to open up any type of communication you like to have. And since you are able to customize the front end js you will be able to read this data. But as I said in question 1 - there will only be a small community helping you
So to sum it up:
I vote for Wavemaker, but make sure to only deploy it if you application will be similar to the templates/demo provided, if you build a unique system you might like to look into other solutions.
All choices have drawbacks. There is not a lot of WM expertise to be had. You'll need to deal with some issues in terms of the library at hand, dojo, spring etc instead.
you can,but it requires some java knowledge. You are operating in a spring MVC you can
you can, you are operating in a dojo client there
possible, probably. worth the effort, doubt it.
1- Drawbacks- It's enterprise focused platform, so will require own effort to learn it.
2- Yeah, you can do pretty much all normal things (at least from my experience, till now)
3- The tool has kind of open-source configuration so its easy to manipulate or customize your codes if needed
4- From my experience, WaveMaker has one of the best and most diverse integration options available.

Java Frameworks [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Recently I've come across many different frameworks for creating web apps in Java such as: Play!, Wicket, Grails, Lift, and Tapestry. What exactly is a framework and what are the benefits of using one? Additionally, I would like to try one out. I want a framework that is lightweight and easy to use and get started with, since my web development knowledge is very limited. Which one would you recommend?
Also I'm sure this question has been asked a dozen times, but it's quite tedious to have to search through past questions to find the answer your looking for.
I believe Lift is for Scala.
Tapestry is a UI-only framework.
Grails is Groovy, Spring, and Hibernate combined into a Ruby On Rails-like environment for rapidly creating CRUD web apps.
Play! and Wicket deserve the moniker of framework.
You don't mention Spring; you should look at it. That's what I would recommend. It's a combination of dependency injection, aspect oriented programming, and great modules for persistence, web and portal MVC, remoting, declarative transactions, message driven POJOs, and lots more. It has a great deal of mindshare and traction. It's been purchased by VMWare, so it's going to be around for a while.
You'll need more than a framework to do web development. In all cases, you can't do web development without HTML, CSS, and JavaScript.
If you are looking for something quick and light, I think Play! framework suits you. The MVC architecture made it similar to Ruby on Rails. Unlike the traditional Java framework, it automatically recompile the Java source code when changes are made, therefore shorten the software development cycle from coding->compiling->testing to coding->testing.
A framework is something like a toolbox you can use for building. Benefits of using one would include saving time, not reinventing the wheel and lots more. This includes frameworks written in other languages.
I assume you're versed in Java, then my personal recommendation would be to give Play! a look and spend something building something in it before you actually have to try the other heavyweights (if at all).
I won't disagree with anyone who says "learn the basics of servlets first". Since you're asking for recommendations, add PicoContainer to the list.
Pico is like Spring in that it does dependency injection and supports test driven development, but they do it in a cleaner (IMO) more "Java like" way by preferring constructors and not using ridiculous xml configuration context files like Spring apps (usually) do. (Helps reduce some of what would be xml caused run-time errors by replacing them with preferable Java code compile-time errors.)
Another nice thing about it is that it's a tiny little framework which makes great attempts to avoid dozens of dependencies and jar bloat (something the Spring maintainers should take notice of). The downside (there's always one, of course) is that it's a small community. (Then again, all the Spring resources out there in Google are somewhat polluted by now with information on past/different versions of this ever-evolving framework, so more isn't always better.)

Could you pls comment before we start our mobile+server project? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
We are a team of four CS undergrad seniors developing a mobile app (+ the web-based servicing architecture ofcourse) with the following intentions:
(1) Its our Degree Project (Thus comes, UML Modeling, Documented Testing & other specification reports)
(2) Our chance to learn & solve issues ranging from UI, data mining, AI, TO product-marketing!
At the end of the day, we wanna see many people globally, benefiting from it.
Could you please comment on the tool set we are using?
(1) Java + Eclipse + Android Plugin (ADT) & SDK (to start with)
(2) Various web-services SDKs
(3) On the server: ?? (dunno yet)
(4) For other artifacts: IBM Rational Modeler
any resources you think shall be better/helpful?
Thanks in advance!
UPDATE: We shortlisted UML/MDT extensions of Eclipse instead of IBM Rational Modeler
That seems a pretty typical setup. If you were doing this professionally, the next addition would be version control; Subversion is probably the most common.
Edit: If you're looking at the "free" price point on a Java server, Tomcat and GlassFish are the first three to mind, I think JBoss also offered a free/evaluation copy.
If you want a server you'd be hosting remotely, Java is one of the more expensive languages to host; PHP is probably the least expensive to host, with Apache being the most common server.
How will you manage your feature/task assignments? I would recommend Google Code if you don't mind allowing your tasks assignments to be public.
Otherwise JIRA is a good alternative (only $10) that my team has started using recently, though I have mixed thoughts about it. A different team currently administers the install so we haven't been able to customize it to our needs.
As for the technical architecture, I would need to know more about your project to make recommendations. Make sure you think about high level components and requirements before selecting technologies.
UPDATE: Without knowing exactly what you need to do on the server side, I would say a good technology to consider using is Spring Core (and possibly some of the other Spring modules). Spring will still allow you to use POJOs, but allow you to construct your application using dependency injection - which ensures your code is loosely coupled. Spring is worth learning - it promotes good programming practices and is used it many Java apps today.

What Java framework would you use with Google App Engine? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
It's been a while since I've done any website with with Java, and am wondering what framework options are out there for Google App Engine.
What framework would you suggest for someone who has no real preference?
I like Ruby On Rails, and am getting into Django, and like that as well. Professionally I'm a ASP.NET developer so I have the most experience with that, but I'm looking to expand into other technologies, and patterns.
It would be nice to have more experience with MVC.
thanks,
Mark
The Spring Framework works, although you have to make sure commons-logging isn't called commons-logging-1.1.1.jar (as I had it in maven conventions, Google provides a jar with this same name and there are classloading issues as a result). So, Spring WebMVC is confirmed to work - which raises the possibility that its sister project Spring Webflow will work - though I can't say I really like where Webflow 2 completely diverged from Webflow 1.
Also, I have yet to find a framework that really encompasses the notion of "saving and continuing" well - users often like to do that, and Webflow 2 really tries to make programming that as difficult as possible if you use its persistence context inside the flows themselves.
Wicket works on App Engine, you just have to make a few tweaks to the configuration.
I've had variable experiences with Vaadin on GAE. Some applications are almost as fast as with localhost, but sometimes the latency is freakish. Probably depends on which server geographically your application gets deployed on.
Try ItsNat, more info.
Don't use it for a simple single reason - vendor lock in.
What happens if the service doesn't meet your satisfaction?
What happens if you can get a better deal (Java hosting) somewhere else?
What if you want to sell your product - where's your platform?
What happens if Google decides App Engine is not worth their effort and close it?
as a side note Google have and will close services that are unprofitable. A simple search will reveal many, escpecially in theses trying times.
Do you care about vendor lock in?
If you don't care about losing your effort and time invested and perhaps want a platform just to play with then I suppose it's OK but for anything serious stay away.

Categories