jatin.jello-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2013-Feb-02 16:58 UTC
Create Ruby on Rails project from existing HTML pages & mysql schema
Hello Rails experts... I have an interesting problem...I''m sure there are many solutions to this but I can''t seem to figure it out - I have an existing set of HTML5/CSS3/jquery/javascript pages - no logic - just the UI with content, etc. And I also have the schema for mysql project. I want to build the entire framework using Ruby on Rails 3.2 - I decided to go with Ruby on Rails rather than PHP or Node.js/Express. However, I''d rather start something from existing than build from ground up using new rails project. I do not want to waste effort that I''ve put in building the HTML5 front-end - again has no logic because there''s no backend. I wanted to start with front-end to generate lot of ideas and create proper UX. and then build the backend using Ruby on Rails. How would I start with this? So far, here''s what I did. I created a new rails 3.2 project - then created a folder called "javascripts" under public directory and copied all my javascripts there. But what about all my HTML files? Shall I just drop them in Views folder and rename each one with .erb extension. And copy all CSS files in layouts main directory? And then how about the database? Or do I need to start fresh on creating schema? Do you recommend MySQL or PostgresSQL? My web application would be similar to ticketmaster website. Any help would be appreciated... Thanks, JP -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ZiFkGf4P3n4J. For more options, visit https://groups.google.com/groups/opt_out.
Walter Lee Davis
2013-Feb-02 22:22 UTC
Re: Create Ruby on Rails project from existing HTML pages & mysql schema
On Feb 2, 2013, at 11:58 AM, jatin.jello-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Hello Rails experts... > I have an interesting problem...I''m sure there are many solutions to this but I can''t seem to figure it out - > > I have an existing set of HTML5/CSS3/jquery/javascript pages - no logic - just the UI with content, etc. And I also have the schema for mysql project. I want to build the entire framework using Ruby on Rails 3.2 - I decided to go with Ruby on Rails rather than PHP or Node.js/Express. However, I''d rather start something from existing than build from ground up using new rails project. I do not want to waste effort that I''ve put in building the HTML5 front-end - again has no logic because there''s no backend. I wanted to start with front-end to generate lot of ideas and create proper UX. and then build the backend using Ruby on Rails. How would I start with this? > So far, here''s what I did. > I created a new rails 3.2 project - then created a folder called "javascripts" under public directory and copied all my javascripts there. But what about all my HTML files? Shall I just drop them in Views folder and rename each one with .erb extension. And copy all CSS files in layouts main directory? > And then how about the database? Or do I need to start fresh on creating schema? Do you recommend MySQL or PostgresSQL? My web application would be similar to ticketmaster website. > Any help would be appreciated...Here''s what I would do. Just as you started your "flat" prototype with nothing and worked toward a UX you liked, start with nothing (none of your designed pages) and let the Rails generators make the stubs they will. Once these are generated, they never change, so you won''t have to worry about any of your fancy code being overwritten. Then start copying and pasting fragments from one to the other. Owing to the way that Rails composes pages out of fragments, with responsibility for rendering passing from the nearest most responsible model object up and out to the main page template, you will find that there are portions of your code that need to be in different places. Read up on how the Rails View works -- Rails Guides are great start, as well as (if you haven''t built a few Rails apps already) the Rails Tutorial at http://railstutorial.org. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Hassan Schroeder
2013-Feb-03 00:03 UTC
Re: Create Ruby on Rails project from existing HTML pages & mysql schema
On Sat, Feb 2, 2013 at 8:58 AM, <jatin.jello-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have an existing set of HTML5/CSS3/jquery/javascript pages - no logic - > just the UI with content, etc. And I also have the schema for mysql project.> And then how about the database? Or do I need to start fresh on creating > schema?Probably. You already got some good advice on dealing with the UI. And actually, I''ve done something very similar, moving markup from an existing non-Rails app to Rails: tedious, but straightforward. But without knowing exactly what you have in terms of db schema and how it translates to Rails conventions, I''d say that''s where the bulk of the work will be. Especially if this is your first Rails app. I would definitely try building out a skeleton app first to play with the models and process flow before even thinking about markup. Best of luck! -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Jatin
2013-Feb-04 13:37 UTC
Re: Create Ruby on Rails project from existing HTML pages & mysql schema
Thank you Walter - am going to give this is a chance and see how I progress... On Saturday, February 2, 2013 5:22:12 PM UTC-5, Walter Lee Davis wrote:> > > On Feb 2, 2013, at 11:58 AM, jatin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:> wrote: > > > Hello Rails experts... > > I have an interesting problem...I''m sure there are many solutions to > this but I can''t seem to figure it out - > > > > I have an existing set of HTML5/CSS3/jquery/javascript pages - no logic > - just the UI with content, etc. And I also have the schema for mysql > project. I want to build the entire framework using Ruby on Rails 3.2 - I > decided to go with Ruby on Rails rather than PHP or Node.js/Express. > However, I''d rather start something from existing than build from ground up > using new rails project. I do not want to waste effort that I''ve put in > building the HTML5 front-end - again has no logic because there''s no > backend. I wanted to start with front-end to generate lot of ideas and > create proper UX. and then build the backend using Ruby on Rails. How > would I start with this? > > So far, here''s what I did. > > I created a new rails 3.2 project - then created a folder called > "javascripts" under public directory and copied all my javascripts there. > But what about all my HTML files? Shall I just drop them in Views folder > and rename each one with .erb extension. And copy all CSS files in layouts > main directory? > > And then how about the database? Or do I need to start fresh on creating > schema? Do you recommend MySQL or PostgresSQL? My web application would > be similar to ticketmaster website. > > Any help would be appreciated... > > Here''s what I would do. Just as you started your "flat" prototype with > nothing and worked toward a UX you liked, start with nothing (none of your > designed pages) and let the Rails generators make the stubs they will. Once > these are generated, they never change, so you won''t have to worry about > any of your fancy code being overwritten. Then start copying and pasting > fragments from one to the other. Owing to the way that Rails composes pages > out of fragments, with responsibility for rendering passing from the > nearest most responsible model object up and out to the main page template, > you will find that there are portions of your code that need to be in > different places. Read up on how the Rails View works -- Rails Guides are > great start, as well as (if you haven''t built a few Rails apps already) the > Rails Tutorial at http://railstutorial.org. > > Walter > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/eK7_bvNOxQwJ. For more options, visit https://groups.google.com/groups/opt_out.
Jatin
2013-Feb-04 13:39 UTC
Re: Create Ruby on Rails project from existing HTML pages & mysql schema
Thanks Hassan.S - I''ve done one mockup twitter-like site (through Rails Tutorials lessons...) so moving on to next. On Saturday, February 2, 2013 7:03:21 PM UTC-5, Hassan Schroeder wrote:> > On Sat, Feb 2, 2013 at 8:58 AM, <jatin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:>> > wrote: > > > I have an existing set of HTML5/CSS3/jquery/javascript pages - no logic > - > > just the UI with content, etc. And I also have the schema for mysql > project. > > > And then how about the database? Or do I need to start fresh on creating > > schema? > > Probably. You already got some good advice on dealing with the > UI. And actually, I''ve done something very similar, moving markup > from an existing non-Rails app to Rails: tedious, but straightforward. > > But without knowing exactly what you have in terms of db schema > and how it translates to Rails conventions, I''d say that''s where the > bulk of the work will be. Especially if this is your first Rails app. > > I would definitely try building out a skeleton app first to play with > the models and process flow before even thinking about markup. > > Best of luck! > -- > Hassan Schroeder ------------------------ hassan.s...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org<javascript:> > http://about.me/hassanschroeder > twitter: @hassan >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qu_SFuTRUWcJ. For more options, visit https://groups.google.com/groups/opt_out.