Good tutorial

Now this is a subject that interests me.

When I first looked at Rails, it was with a view to finding a convenient and practical way of developing a database application using open source software. I was looking for a suitable client that would give me flexible and easy to create form handling. I was aiming towards a linux server, probably running MySql, and had a specific application to develop. Not massive, but fairly taxing nonetheless. I had previously written a simple form of the app using MS Access, but was looking for a proper server based solution.

One direction that started to look promising was to use Open Office Base as a client to a MySQL database. I started with a simple phone book app. The Base forms front end looked promising, and a I found the ability to use Base to connect to different databases (ie. access and MySql) provided a good method of migrating data between apps. However, I found trying to pull the forms together into an overall app became cumbersome and was going to require some detailed coding. Also, I couldnt get it to hang together as a stable app. Particularly where some clients were on Windows 98.

When I started experimenting with Rails I was Very pleasantly surprised at how quickly I could get things up and running and how by using browser based clients, there were no stability problems. My biggest concern was - how would Rails hold up when I extended the application in terms of functionanality. I was developing a system for pulling together several functions including a booking system for equipment hire.

Any fears I had about Rails becoming unwieldy or unstable have been totally dispelled. And as I get more to grips with it I find it simpler and simpler to provide the functionality I require. (I am also completely taken by Ruby as a programming language).

Now to your specific point. I have created some fairly interesting forms to provide a neat user interaction. One of them presents a list of equipment down the page with a view of each day of the week across the page. Equipment can be booked by clicking in the cell at the day/equipment intersection. I use active updating to just refresh the individual cell, and the whole thing is incredibly stable and nice to use. At the top of the page, different categories or views of different orders can be selected and the page auto updates when the selections change.

I have created a customer look up screen that lets me choose by radio buttons for A-Z on first name and last name. The page auto updates and by using paging on the result, updates instantly. On the page, I have also included a drop down select listing names of customers for all pages so that a selection can be made without having to page through multiple pages.

So what is the point of this response you may ask??

1. I get more and more excited about Rails all the time, continuing to add functionality to my current app is getting me close to a full office management system. 2. The drawback that I find is that every form has to be hand crafted and the scaffold forms, though useful for what they are intended are obviously too limited. 3. I believe that it should be possible to produce a forms creation solution, ultimately allowing drag and drop positioning and I am trying to move towards that approach. 4. As a first step, I have created quite a nice auto form layout that uses data to define the order of field display, length of field and type of field (including options for boolean fields to be Yes/No etc). 5. Master/Detail type forms require more consideration along with how some of the more complex forms fit the CRUD approach. 6. Another area that vexes me is the desire to include some fairly sophisticated process logic. For example, I use a standard menu system in a consistent header section at the top of each page. The menu only includes options relevant to the page and data state. eg. if deleting something is not allowed then no delete option is offered. Currently this uses lots of conditional statements, but clearly needs tidying up into helper methods. 7. I would be pretty emabarrassed to share my code since these forms were developed during my early Rails learning days and need serious tidying up, as to does the data and business logic.

I often wonder just how many others are using Rails in an Intranet type of application.

Your point about tutorials and examples IMHO is valid. The they all tend to describe a similar simple application.

I think the area of how to develop forms with good user interaction is potentially quite a large area where a sharing of ideas could be very useful. Perhaps working towards some common ideas that could lead to developing some useful plugins. Even if we didnt come up with specific solutions, I think the sharing of ideas could lead towards improving approaches on how to present complex data based on multiple tables and manage process login etc. For example, I currently store my form layout data in the model. I then have a standard helper function that accesses this data when rendering the form. Now I am not sure this sort of info belongs in the model, and of course it would be better being table based.

If there are others who are willing to share ideas and experiences in this aspect of Rails, I would be interested in contributing - perhaps there could be some useful stuff for the wiki.    Tonypm

<...>

As Tonypm pointed there is too much hand crafting required to get a decent solution and this is what (IMHO) Rails should also try to take to another level.

I'd argue, that only "hand crafting" will provide decent solution.

Regards, Rimantas