GeeCON Prague 2014*
The moose likes IDEs, Version Control and other tools and the fly likes Why don't all IDEs Generate DAOs? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Why don Watch "Why don New topic
Author

Why don't all IDEs Generate DAOs?

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1073
I have used MyEclipse and found it totally cool in that it offers to generate DAOs for you during the reverse engineering phase.

Now that my company is using Intellij IDEA 12, I'm both happy and sad. Intellij is a great IDE, but it seems to expect the developer to generate DAOs (and other code) manually! Sure, it will reverse engineer the entity classes, but the other boilerplate classes, well, it seems like you're on your own!

If you have a couple hundred tables in your database with complex relationships, that can mean a LOT of time and work (MyEclipse automates this!).

Why don't all IDEs generate DAOs for you so you can get to work on your business logic? .... DAOs are BOILERPLATE classes.

So, my question is if there's some type of add-in for Intellij or for Hibernate in general that will automate DAO generation? I've looked at Hibernate tools, but nothing jumped out at me.

Intellij's support for Hibernate tools is limited to the 0.7 release back in 2006. Huh? Seriously?

Due to our project time constraints and database complexity, we're seriously considering dumping Intellij and going back to MyEclipse.

Appreciate any suggestions or replies.

Thanks,

Mike
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

I feel your pain. Generating boilerplate classes manually is a pain.

I don't know the answer to your specific question, but for open source IDEs, its because no one has written the code. Actually, even for commercial packages, the reason a feature is missing is because (1) no one asked for it or (2) no one decided it was worth doing.

All engineering is about tradeoffs. You can't do everything you want, you have to decide where to spend your scarce resources (i.e. engineering time).

I have a higher level complaint based on your question: Why do so many tools for Java require so much mindless boilerplate? Large scale Java applications seem to spend as much time on boilerplate as they do solving the real problem in the domain.

Sigh.
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1073
Pat Farrell wrote:I feel your pain. Generating boilerplate classes manually is a pain.

I don't know the answer to your specific question, but for open source IDEs, its because no one has written the code. Actually, even for commercial packages, the reason a feature is missing is because (1) no one asked for it or (2) no one decided it was worth doing.

All engineering is about tradeoffs. You can't do everything you want, you have to decide where to spend your scarce resources (i.e. engineering time).

I have a higher level complaint based on your question: Why do so many tools for Java require so much mindless boilerplate? Large scale Java applications seem to spend as much time on boilerplate as they do solving the real problem in the domain.

Sigh.


Hey Pat,

You know that the MyEclipse IDE will generate DAOs as part of its reverse engineering process. And, the even more expensive "MyEclipse for Spring" ($149/yr.) will generate a completely working project (with JSPs, Hibernate integration, Service, Web, and other layers) from the database (forward engineering is also supported). Yet, I really like Intellij for it's amazing editor capabilities. Overall I like Intellij the best, but hopefully they will integrate or create DAO support too.

I agree with your higher-level complaint too. It seems that with all the moving parts in a typical Java web app, and the never ending desire to have "infinite flexibility" (yeah, right), application development is ridiculously tedious and time consuming. It's no wonder many software projects fail.

I'm currently thinking about switching to Ruby (like the guy who invented Struts, Craig, did a while back), or maybe Python. There's always Objective-C and mobile development too. Objective-C is much simpler (though still strange to me) than Java.

Lots of options I guess.

Thanks for your reply.

- mike

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Mike London wrote:I'm currently thinking about switching to Ruby (like the guy who invented Struts, Craig, did a while back), or maybe Python. There's always Objective-C and mobile development too. Objective-C is much simpler (though still strange to me) than Java.


I have not used Ruby professionally, but my daughter did and we talked about it. Her verdict was that Ruby on Rails makes it really easy to slap up a website with cool features, but it doesn't scale. Not for performance, nor for large project teams.

I like Python for things that are bigger than I want to do in a scripting language (i.e. bash or perl) but smaller than a complete web application. I don't know how well it grows to what we do with Java, JSP, HTML, Javascript, etc.

Objective-C is where the money is. Its literally just C with some Smalltalk constructs hacked onto it. If you have done C, and done Smalltalk, its trivial to pick up. It wasn't a very pretty hack job, but it works. The power in Objective-C is not the language, its kinda marginal. The power is in the amazing library that Apple and NextStep have built to make building slick GUIs easy.
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1073
Pat Farrell wrote:
Mike London wrote:I'm currently thinking about switching to Ruby (like the guy who invented Struts, Craig, did a while back), or maybe Python. There's always Objective-C and mobile development too. Objective-C is much simpler (though still strange to me) than Java.


I have not used Ruby professionally, but my daughter did and we talked about it. Her verdict was that Ruby on Rails makes it really easy to slap up a website with cool features, but it doesn't scale. Not for performance, nor for large project teams.

I like Python for things that are bigger than I want to do in a scripting language (i.e. bash or perl) but smaller than a complete web application. I don't know how well it grows to what we do with Java, JSP, HTML, Javascript, etc.

Objective-C is where the money is. Its literally just C with some Smalltalk constructs hacked onto it. If you have done C, and done Smalltalk, its trivial to pick up. It wasn't a very pretty hack job, but it works. The power in Objective-C is not the language, its kinda marginal. The power is in the amazing library that Apple and NextStep have built to make building slick GUIs easy.


Pat,

That's interesting. I've come to the same conclusions.

I'm doing some iPhone/iPad stuff right now using the JetBrains "AppCode" IDE (much better, IMHO, than XCODE for the coding part).

I've found it difficult to market iOS apps, though, since the group consensus is that everything is free and a just click away...(the new normal?)

-mike
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Mike London wrote:I've found it difficult to market iOS apps, though, since the group consensus is that everything is free and a just click away...(the new normal?


Most good engineers are bad at marketing, separate skills needed. People are cheap, so free is better, which is driving a lot of apps to be marketed as "freemium" where there is a free version, but you get a better version if you pay. Or there are no ads on the paid version.

If you write a popular app, supporting it with ads can be very lucrative.
 
GeeCON Prague 2014
 
subject: Why don't all IDEs Generate DAOs?