I want to design a blog using RoR. It is also my initial step with RoR. I want to learn both Ruby and Rails with this real-life project that will be live on the net. Since I am from a .NET background, I use a language of Toolbox with Controls on it. How to display blog posts one after the other as we see in blogs? Is there any Ruby control that is similar to .NET Repeater control? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rails is too complicated. The typical way to learn rails is to copy an app out of a book, and you will have very little understanding of what is going on--especially if you don''t know ruby at an intermediate level. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Kottom
2011-Aug-02 09:04 UTC
Re: Re: How to design and write my first blog using RoR?
And if you need an app to copy... http://weblog.rubyonrails.org/2008/11/27/new-15-minute-blog-video-on-rails-2-2 It''s not the latest and greatest version, but it will get you started. Set your sights low initially, and plan to throw the first version away. On Tue, Aug 2, 2011 at 11:00 AM, 7stud -- <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Rails is too complicated. The typical way to learn rails is to copy an > app out of a book, and you will have very little understanding of what > is going on--especially if you don''t know ruby at an intermediate level. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I have read few pages of Beginning Ruby by Peter Cooper. I can learn fast when I write a real-life project and implement techniques of the book and forums. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Martin Wawrusch
2011-Aug-02 09:08 UTC
Re: Re: How to design and write my first blog using RoR?
Here is a guide to create a blog: http://guides.rubyonrails.org/getting_started.html The development model is different than asp.net. There aren''t any controls. In case of the repeater, you iterate over the collection. Very rough sample code Controller: def index @posts = Post.all # This fetches all posts and stores it in an instance variable named posts end in your view you iterate over this: @posts.each do | post| <%= post.message %> This iterates over each element of posts and prints the message. Obviously you want do adorn this with the correct html elements. And I agree that jump starting into a simple project is the best way of doing it. You will also want to look into rubygems.org PS: The first week will be tough, but then you will see a sudden rise in productivity. On Tue, Aug 2, 2011 at 2:00 AM, 7stud -- <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Rails is too complicated. The typical way to learn rails is to copy an > app out of a book, and you will have very little understanding of what > is going on--especially if you don''t know ruby at an intermediate level. > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
What are the initial steps? I have a little knowledge of PHP as well and with that limited knowledge I think first I need to design a web-page using HTML and CSS. Later I need to write Ruby classes and integrate code within those nasty HTML DIVs. Is there any free Ruby front-end that can help? I have Aptana 3 installed. Anything better than that? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Martin Wawrusch
2011-Aug-02 09:20 UTC
Re: Re: How to design and write my first blog using RoR?
First you need to go through the tutorial I linked to. Then you might want to add additional styling. On Tue, Aug 2, 2011 at 2:17 AM, Rubyist Rohit <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> What are the initial steps? I have a little knowledge of PHP as well and > with that limited knowledge I think first I need to design a web-page > using HTML and CSS. Later I need to write Ruby classes and integrate > code within those nasty HTML DIVs. > > Is there any free Ruby front-end that can help? I have Aptana 3 > installed. Anything better than that? > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
http://guides.rubyonrails.org/getting_started.html is the best site for new ROR developer.. and it also show how to create simple blog .. Best of luck.. On Tue, Aug 2, 2011 at 2:26 PM, Rubyist Rohit <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I want to design a blog using RoR. It is also my initial step with RoR. > I want to learn both Ruby and Rails with this real-life project that > will be live on the net. > > Since I am from a .NET background, I use a language of Toolbox with > Controls on it. How to display blog posts one after the other as we see > in blogs? Is there any Ruby control that is similar to .NET Repeater > control? > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- *Regards, Dhaval Mehta* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
If you''re really interested in learning Rails and your first step is going to be writing HTML and CSS, you might be doing it wrong. Same thing with focusing on the editor you use. Watch the flow in the Rails blog example video link (or the Rails guide that Martin linked to), and notice the flow of development. Then try writing your own code (borrowing heavily from these materials) to built your own app. On Tue, Aug 2, 2011 at 11:23 AM, Dhaval Mehta <2010dhaval-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> http://guides.rubyonrails.org/getting_started.html > > is the best site for new ROR developer.. > > and it also show how to create simple blog .. > > Best of luck.. > > > > On Tue, Aug 2, 2011 at 2:26 PM, Rubyist Rohit <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote: > >> I want to design a blog using RoR. It is also my initial step with RoR. >> I want to learn both Ruby and Rails with this real-life project that >> will be live on the net. >> >> Since I am from a .NET background, I use a language of Toolbox with >> Controls on it. How to display blog posts one after the other as we see >> in blogs? Is there any Ruby control that is similar to .NET Repeater >> control? >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> > > > -- > *Regards, > Dhaval Mehta* > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rubyist Rohit wrote in post #1014409:> What are the initial steps? I have a little knowledge of PHP as well and > with that limited knowledge I think first I need to design a web-page > using HTML and CSS. Later I need to write Ruby classes and integrate > code within those nasty HTML DIVs. >Guess what? After you figure out all the complexities of programming your site with rails, then you have to make it look good. CSS may be more complicated than rails. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
@Martin: I am going through the tutorial link you provided. It discusses about assumptions made by Ruby. One such assumption is: "Keeping code DRY (Don''t Repeat Yourself)". Is Ruby assuming the drawbacks of code re-usability that is popular throughout programming paradigm? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Rubyist Rohit wrote in post #1014419:> @Martin: > > I am going through the tutorial link you provided. It discusses about > assumptions made by Ruby. One such assumption is: "Keeping code DRY > (Don''t Repeat Yourself)". Is Ruby assuming the drawbacks of code > re-usability that is popular throughout programming paradigm? >Quite the opposite: Situation 1: you have a method with 20 lines of code that performs a calculation, and every time you need to execute that code you call the method. Situation 2: every time you need to do do the calculation, you write the 20 lines of code in your app. Which situation would you deem to be the one that repeats itself? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
7stud -- wrote in post #1014420:> Rubyist Rohit wrote in post #1014419: > > Situation 1: you have a method with 20 lines of code that performs a > calculation, and every time you need to execute that code you call the > method. > > Situation 2: every time you need to do do the calculation, you write the > 20 lines of code in your app. > > Which situation would you deem to be the one that repeats itself? > > edit: Upon rereading your question, I have no idea what you are asking.I mean, what is meant by DRY methodology of Ruby? If it insists to re-use code, then this paradigm is already there, from before Ruby. What exactly is meant by: "Don''t Repeat Yourself"? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Kottom
2011-Aug-02 10:41 UTC
Re: Re: How to design and write my first blog using RoR?
From Wikipedia (which is the first Google result for "don''t repeat yourself"): In software engineering <http://en.wikipedia.org/wiki/Software_engineering> , *Don''t Repeat Yourself* (*DRY*) or *Duplication is Evil* (*DIE*) is a principle<http://en.wikipedia.org/wiki/Principle#Principle_as_axiom_or_logical_fundament> of software development<http://en.wikipedia.org/wiki/Software_development_process> aimed at reducing repetition of information of all kinds, especially useful in multi-tier architectures <http://en.wikipedia.org/wiki/Multi-tier_architecture>. The DRY principle is stated as "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system." On Tue, Aug 2, 2011 at 12:36 PM, Rubyist Rohit <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 7stud -- wrote in post #1014420: > > Rubyist Rohit wrote in post #1014419: > > > > Situation 1: you have a method with 20 lines of code that performs a > > calculation, and every time you need to execute that code you call the > > method. > > > > Situation 2: every time you need to do do the calculation, you write the > > 20 lines of code in your app. > > > > Which situation would you deem to be the one that repeats itself? > > > > edit: Upon rereading your question, I have no idea what you are asking. > > I mean, what is meant by DRY methodology of Ruby? If it insists to > re-use code, then this paradigm is already there, from before Ruby. > > What exactly is meant by: "Don''t Repeat Yourself"? > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Isn''t the concept of Classes mean this? Does Ruby has something more advanced? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Kottom
2011-Aug-02 11:00 UTC
Re: Re: How to design and write my first blog using RoR?
Lots of people, especially beginners, copy and paste a lot of code. Just about everyone''s done it, and it''s a great way to get started and get something that works, but the resulting code can be brittle and hard to maintain because you''ve got the same or similar logic spread out everywhere. Classes and OO are tools, but they don''t insure against bad coding practices. You''ll hear the term "refactoring" a lot. Look it up, and get to know what it means. It''s how you get from the kind of spaghetti I was describing to high-quality, DRY code. On Tue, Aug 2, 2011 at 12:53 PM, Rubyist Rohit <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Isn''t the concept of Classes mean this? Does Ruby has something more > advanced? > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
IMO you are mixin Rails and Ruby. Rails has one focus on facilitating code reuse. In no way Ruby or Rails have invented code reuse. Nobody says that. If you are learning Rails I think you should do what others are saying first. Rubyist Rohit wrote in post #1014431:> Isn''t the concept of Classes mean this? Does Ruby has something more > advanced?-- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.