What tools/practices do you recommend for rapidly getting a working model of a database/MVC-model working? I could start hacking away at the framework of my choice and add tables as I go, but I prefer to get the structure fleshed out a little before I hit the keyboard.
I could just use pen-and-paper, but it can be a bit crude to rapidly do things. I'd like something 1 step above - perhaps a diagramming tool that allows me to model relationships. UML?
You can try and use the WebRatio tool. It's model driven and it's based on the WebML notation (soon to become an OMG standard under the name of IFML).
The tool is free for non commercial purposes and personal use, you can download it for free.
[Disclaimer: I'm with Politecnico di Milano and WebRatio, and among the inventors of WebML/IFML]
SQL Power Architect is free and open source, good for designing your database model. It can forward or reverse engineer to most databases.
http://www.sqlpower.ca/page/architect
Java Spring Roo is useful for quickly setting up a RESTful web service or server-generated HTML MVC system.
Gnome Dia is a good open source diagramming tool that can do UML, and has plugins to write Java or SQL for you:
https://live.gnome.org/Dia
Related
The database for one the application that I am working on is not confirmed yet by the business.
Best guess is Oracle and DB2.
What I've heard is initially the project will go live with DB2 V9 and then to Oracle 11g.
We are using Spring 3.0.5, Hibernate 3.5, JPA2 and JBoss 5 for this project
So what are the best practices here going into the build phase and test phase?
Shall I build using DB2 first and worry about Oracle later (this
doesn't sound right)?
Or, shall I write using JPA (Hibernate) and
then generate the database schema?
Or something else?
PS: I've no control over the choice of the DB, what and when, as these are strategic decision made by people sitting in nice rooms getting fat cheques and big bonuses.
Thanks,
Adi
Obviously you are loosing the access to specific features of the database if you are writing your application database agnostic. The database is, except for automatic optimizations done by JPA and Hibernate, reduced to common features. You have to set some things to automatic and trust JPA/Hibernate to do it right that you could set specifically if you knew the database (e.g. id generator strategies).
But it seems that the specific developer features of the database are not relevant for the decision so they can't be relevant to the application. What other reasons may influence the decision (like price, money, cash, personal relations, management tools, hardware requirements, existing knowledge and personell) can only be speculated about.
So IMHO you don't have a choice. Strictly avoid anything database specific. That includes letting the JPA/Hibernate generate the schema (your point #2). In this project setup you shouldn't tinker with the database manually.
Well... sadly there ARE some hidden traps in JPA/Hibernate developement that make it database dependent (e.g. logarithmic functions are not mapped consistenly). So you should run all your tests against all possible databases from day one. As you write "Best guess is..." you should just grab any database available and test against it. Should be easly setup with the given stack.
And you should try to accelerate the decision about the database used, if possible.
Just "write using JPA (Hibernate)" develop it to be de database agnostic. Put all you business logic in java code not stored procedures.
If you are using spring you don't need jboss you could use just tomcat, about a quarter of the foot print, and much simpler imho.
Spring vs Jboss and jboss represents all that is bad, while spring represents all that is good in Java enterprise development
We have add this issue and had to migrate late in the project, leading to a lot of extra works, frustrations and delays.
My advise is to define an abstract layer. Go to the point you may have a data model without any database, say with tables or text files.
Then when you have to switch to some database, you can optimize for it, while staying free to continue application development on any already developped model. So you don't delay the developpers on the app while one is tuning the DB2 layer. When everything is duly validated, the team can switch on it.
I will disagree with the currently accepted answer suggesting avoiding database specific things. From a performance perspective, that would be a pity, and it's definitely doable.
JPA/Hibernate and also jOOQ can abstract over a lot of things and if you're using the query builder APIs of either technology (criteria query in JPA, or jOOQ for more advanced SQL), you can get very far in a vendor agnostic way without removing all the vendor specific stuff. For example, you can easily create a vendor specific predicate like this:
.where(oracle ? oracleCondition() : db2Condition())
What you should do from the very beginning of such a project, once you know you'll have to support both dialects is to run integration tests on both database products. For this, I recommend testcontainers, which makes running such tests quite simple. If you have to add support for another dialect, and if you're using one of the above abstractions, you can simply add another testcontainers configuration, check if your application still works, tweak 2-3 things, and you're set.
Disclaimer: I work for the company behind jOOQ.
I've been searching on how to make a database in J2ME for S40 development, but it seems that Derby is too complicated and RMS doesn't have the capabilities of adding other columns and rows...
I just want to know if there's anything like SQLite for S40 development.
Or if there's a tutorial on how to use the Database component in the Visual Midlet for S40 development. because I don't know how to use it, and I really need to make a database for my application.
btw, I can't get rid of the database and use file communication because it's slow and complicated as well.
Thank you very much in advance :)
SQLite is not supported on Series40. In fact, I am not aware of any SQL databases that is available for Series40. RMS is your best option at this time. I can recommend using an object persistence framework such as Floggy for easier development with RMS.
SQLite never support with Java ME. Look at List of database framework for Java ME development. But I suggest don't use 3rd party database for S40. Because most of the s40 mobiles having small amount of heap memory (not more than 2 MB). So better way, Go with RMS.
I am new in Sybase and Power Builder.
What are the best references and web resources to learn them in a useful and fast way ?
For now, I use http://www.sybase.com as my base reference.
Does anyone know good and practical tutorials for Power Builder V.12 .Net ?
From Where I can download a complete version of it and use it for building my application ?
I know the data window is the magical part in Power Builder and I need to know how to create and use a professional data window and how to make interaction and pass paramters between them and also how to dispaly different views like Master-Detail relationship and Tree-Sturcture or List-Structure and so on.
I would like to know the information I need to build a rapid web and database application plus customzing and editing the existing desktop application.
There is a 45 trial version of Powerbuilder which you can download from here:
http://response.sybase.com/forms/PB12Eval
Sybase's books that come with Powerbuilder are fairly comprehensive and quite a good way to get started.
http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.infocenter.pb.12.1/doc/html/title.html
I can't help with Powerbuilder but Rob Verschoor's Sypron.nl is the place to pick up Sybase information - there's loads in there from common "gotachas" to quizzes. His quick reference is terrific and well worth investing in.
Well, it all depends on how much experience you already have (not counting Sybase & PB).
Then there is the issue that app development and Db design are completely different disciplines: people who are good at one are rarely good at the other. Assuming you are the app developer, hire a good modeller/DBA. Product manuals are for reference only; you cannot learn how to code; put an app together; what code segments should be deployed where; best practice; etc from them.
To take even reasonable advantage of the DataWindow, you need a good Database (normalised, genuinely relational, security, etc), AND reasonable experience handling the client/server model (send SQL batch to server; receive & process result set).
You need a good PFC Library. The lib that comes with PB is fat as, and very slow. The first thing we do is strip that down, and create our own, to reduce .pbl size and increase speed.
Last but not least, a good handle on stored proc and Transaction rules. That requirement is true for any app, not just Sybase/Pb.
It sort of depends on what you want to do. PB12 comes with 2 IDEs -- PB12.NET is for creating WPF applications in .NET. PB12 Classic is for creating traditional PB applications as well as WinForm and WebForm .NET type applications.
There are some videos available on PB (some free, some paid)
Yakov Werde has a video titled "Essential PowerBuilder Series" that's about $700. You can see a free preview of it here.
Sybase has some free videos and tutorials here.
Also, there are some older PowerBuilder books like "PowerBuilder 9 Advanced Client/Server Development" that may help you. They're a little dated and don't cover any of the .NET stuff, but a lot of the basics are still the same.
The information you are looking for has always been somewhat of a challenge to find. Without all the corporate training I'm not sure how I would have learned as quickly.
If you are like me then learning by example is probably the best way. I'd go to codeplex and get yourself a working (and well designed) application to learn by example.
Also, believe it or not, I have learned a thing or two by reading the online documentation. Considering you are working with a new version of PB you've got your work cut out for you there isn't much out there. You may contact me if you have specific questions, if I have time then I would be happy to help a fellow developer.
Requirements for archival type software
1. Data/Image/possibly video.... upload/search/retrevial/edit from web.
2. Easily implemented user defined Custom Fields
3. Easy backup.
4. Low cost ... either opensource or very low cost
I am a very novice programmer. My primary goal is to manage a collection and publish it to the web.
Options
A. Open source software such as collective access
Problems: Custom fields not supported. Continued support? Portablity of
database?
B. Use Microsoft Access and then use MVC or other development platforms to eventually
publish to the web.
Problems:Difficult to integrate to web?
C. Design my own MVC database application.
Problems:Difficult for novice programmer? Custom Fields and Upload of various data
formats difficult to implement?
Sounds like you are looking for a Digital Assets Management system. I found ResourceSpace (http://www.resourcespace.org/) and Razuna (http://www.razuna.org/) very useful for similar projects - both fall into your A category.
Requirements for archival type
software 1. Data/Image/possibly
video.... upload/search/retrevial/edit
from web. 2. Easily implemented user
defined Custom Fields 3. Easy backup.
4. Low cost ... either opensource or very low cost
Hi there,
As mentioned here before, but Razuna will satisfy your requirements quite well.
It can manage images, documents, videos and audios. It will share folderd and collections on the web with access permissions and will allow you to search among the different kind of assets as well.
Moreover, it can handle metadata of all this asset. It will not only read metadata, but also WRITE metadata, also. Furthermore, you can set the custom fields for each asset type and users will have a web interface to work with.
Razuna supports different databases (H2, MySQL, MS SQL and Oracle (soon DB2)) and let's you migrate from one db to another with ease (backup / restore option).
Best of it all: It is available under a open source license for you to deploy and enjoy today. You can get it at http://razuna.org.
Kind Regards,
Nitai
PS: I'm the main developer and founder of Razuna.
I am quite happy to code out tables by hand when making a database but it's not the easiest way to convey information about a database to someone else, especially someone that's not so comfortable coding the tables via a script and would instead use something such at phpMyAdmin.
Is there thus a free program (for me to use it it'll have to work on a Mac but feel free to suggest PC apps for others with the same Q) or script (preferably in PHP or Python) that allows you to design database structure and will then output either a basic diagram or the code as chosen by the user?
Well on the PC you can use MS Visio to produce a DB Entity diagram.
It will even reverse engineer one from an existing Database.
A pain to set-up the first time you use it, but quite handy thereafter.
Open System Architect has some potential. Its very similar to Visio.
I'm a big fan of ARGO UML from Tigris.org. Draws nice pictures using standard UML notation. It does some code generation, but mostly Java classes, which isn't SQL DDL, so that may not be close enough to what you want to do.
You can look at the Data Modeling Tools list and see if anything there is better than Argo UML. Many of the items on this list are free or cheap.
Also, if you're using Eclipse or NetBeans, there are many design plug-ins, some of which may have the features you're looking for.
I use the aptly named Database Design Tool. It's extremely simple and unfortunatly it's developed any more, however. It's the best tool I've come across that is free and at the end of designing your tables, it generates the T-SQL for you. It's also language independent.
You could try out MySQL Workbench which originates in the open source dbdesigner. There's a free community edition available. You can design the database via er-diagrams or reverse engineer an existing database.
MySQL Workbench is the best DB design tool that I've tried
I'm currently checking out SQL Power Architect (both w/ PostgreSQL and Mysql - but it also supports other vendors) and it definitely seems promising. Does both forward and backward SQL engineering. The Community Edition is open source and cross platform (Java). You can check it out yourself: http://code.google.com/p/power-architect/
When strictly dealing w/ MySQL so far I've otherwise used MySQL Workbench, http://wb.mysql.com/ which performed reliably.
I always have enjoyed Eclipse. There are a few plugins for it that look like they will do what you want.
SchemaBank (a web-based SaaS vendor) can turn your ER design into SQL statements for MySQL and PG. Can't do graphics export yet though. The nice thing is you don't need to install anything ('cos its browser-based) and it costs virtually nothing. You should be able to share your design to other people too.
SQLDeveloper from Oracle can work with Oracle and MySQL database.
http://www.oracle.com/us/corporate/press/020861