Hi, I''m just curious how much scaffold code survives into production. It seems to me like a trick to show how quickly a rails app can be developed but that it all needs to be replaced along the way. I played with scaffold code a bit at the beginning but am not using it anymore. Any thoughts? Peter _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Peter Michaux wrote:> Hi, > > I''m just curious how much scaffold code survives into production. It > seems to me like a trick to show how quickly a rails app can be developedHi, Peter, yes, but why would one want to call this a "trick"? It''s a great way to have something functional in no time and develop more (and replacing) functionality around it. While it is sold as this and nothing more nobody is tricked IMHO Regards Jan> but that it all needs to be replaced along the way. I played with > scaffold code a bit at the beginning but am not using it anymore. > > Any thoughts? > > Peter > >------------------------------------------------------------------------ > >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
I use scaffold code in production sometimes, but the real advantage is this: 1. Write scaffold :yourmodel 2. Start browser 3. Insert data into database 4. Code part of application 5. Check what it does in your browser, say you''ve coded the "new" action, you can check the scaffold "list" action whether it worked or not 6. goto step 4 vs: 1. Open your database manage application 2. Insert data into database 3. Code part of application 4. Check what it does in your database manager 5. Check what it does in your browser 6. goto step 3 The scaffold way saves you time because you don''t need a database manager. With scaffold you don''t have to do 2 steps every time you code something. -- Posted via http://www.ruby-forum.com/.
Of course if you''re writing tests, you don''t need to go through these steps :) 1. Write tests 2. Write code that makes tests pass 3. Rinse and repeat Pat On 12/4/05, Jules <julesjacobs-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I use scaffold code in production sometimes, but the real advantage is > this: > > 1. Write scaffold :yourmodel > 2. Start browser > 3. Insert data into database > 4. Code part of application > 5. Check what it does in your browser, say you''ve coded the "new" > action, you can check the scaffold "list" action whether it worked or > not > 6. goto step 4 > > vs: > > 1. Open your database manage application > 2. Insert data into database > 3. Code part of application > 4. Check what it does in your database manager > 5. Check what it does in your browser > 6. goto step 3 > > The scaffold way saves you time because you don''t need a database > manager. With scaffold you don''t have to do 2 steps every time you code > something. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
I thought the same thing. I don''t use scaffold since I want to customize the HTML, the fields displayed, and/or the view methods available. Is it possible to change the default HTML code for scaffolds and have it apply to a single Rails directory and not get overwritten by upgrades? csn --- Peter Michaux <petermichaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I''m just curious how much scaffold code survives into production. It seems > to me like a trick to show how quickly a rails app can be developed but that > it all needs to be replaced along the way. I played with scaffold code a bit > at the beginning but am not using it anymore. > > Any thoughts? > > Peter > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Peter: I just built a site that had two parts. A public viewable part and an admin part. The public viewable part all got changed but with the admin part, the client was happy to save the money and just go direct with scaffold generated pages. They did everything the client needed for this simple application and it saved me time and them money. I think many people use the scaffolding just to get underway. I think it works fine for that and a bit more than that. For instance, I put a website together for me to track my time spent on client projects. I don''t need anything fancy for adding clients, adding tasks and adding projects, so I use the scaffolding for that. BUT...to quote from the Agile Web Dev book - "scaffolding is not meant to be the shake and bake of website design". Just my two cents worth. bruce PS. Just developed another website this weekend and have to say that Rails is a marvel. I was drawn into rails through that video you refer to, but since I have met the product in more depth, I am more impressed rather than less. Rails is a thing of beauty and scaffolding is a useful tool. On 4-Dec-05, at 10:48 AM, Peter Michaux wrote:> Hi, > > I''m just curious how much scaffold code survives into production. > It seems to me like a trick to show how quickly a rails app can be > developed but that it all needs to be replaced along the way. I > played with scaffold code a bit at the beginning but am not using > it anymore. > > Any thoughts? > > Peter > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
On 12/4/05, Peter Michaux <petermichaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m just curious how much scaffold code survives into production. It seems > to me like a trick to show how quickly a rails app can be developed but that > it all needs to be replaced along the way. I played with scaffold code a bit > at the beginning but am not using it anymore.I use scaffolding extensively in production, but I''ve modified Rails'' default scaffolding to add more features and customization options. I can''t imagine using the default scaffolds for anything but the simplest schema.
--- Jeremy Evans <jeremyevans0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12/4/05, Peter Michaux <petermichaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''m just curious how much scaffold code survives into production. It seems > > to me like a trick to show how quickly a rails app can be developed but that > > it all needs to be replaced along the way. I played with scaffold code a bit > > at the beginning but am not using it anymore. > > I use scaffolding extensively in production, but I''ve modified Rails'' > default scaffolding to add more features and customization options. I > can''t imagine using the default scaffolds for anything but the > simplest schema.What file(s) do you edit? thanks csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Jeremy, what have you added? - Peter _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On my system they are in C:\ruby\lib\ruby\gems\1.8\gems\rails- 0.13.1\lib\rails_generator\generators\components\scaffold\templates I have a backup copy of my customizations so that when I get around to updating rails my customizations won''t be overwritten. Search for these files on your system: controller.rb form.rhtml form_scaffolding.rhtml functional_test.rb helper.rb layout.rhtml style.css view_edit.rhtml view_list.rhtml view_new.rhtml view_show.rhtml ~Jason On 12/4/05, CSN <cool_screen_name90001-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote:> > > > > I use scaffolding extensively in production, but I''ve modified Rails'' > > default scaffolding to add more features and customization options. I > > can''t imagine using the default scaffolds for anything but the > > simplest schema. > > What file(s) do you edit? > > thanks > csn > > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 12/4/05, Peter Michaux <petermichaux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> what have you added?These are the main features I added: Choose which fields are displayed in the scaffold and in which order Choose which methods are added by the scaffold function Handle belongs_to associations with select boxes in the new/edit forms Add HABTM association scaffolding using two select boxes Add simple search scaffolding (using all fields from new/edit form) Add scaffolding for merging records (combining two records into one by updating all associated tables) Show associated data instead of foreign key integer in show/search results scaffold Set the css class of scaffolded tables per ActiveRecord class Override the input widget type and widget options per attribute Override the directory of the scaffolded forms per controller
Julian ''Julik'' Tarkhanov
2005-Dec-05 01:12 UTC
Re: How much scaffold code survives to production?
On 4-dec-2005, at 18:48, Peter Michaux wrote:> Hi, > > I''m just curious how much scaffold code survives into production. > It seems to me like a trick to show how quickly a rails app can be > developed but that it all needs to be replaced along the way. I > played with scaffold code a bit at the beginning but am not using > it anymore.Little to none. I want a port of meta and meta.Admin from Django (without Django), looks like technoweenie is working on it (but I can''t get to installing darcs which is obviously very lame of me) -- Julian ''Julik'' Tarkhanov me at julik.nl