On Aug 11, 8:52 am, Peter De Berdt <[email protected]> wrote: > On 11 Aug 2010, at 12:26, psyionx wrote: > > > 1.my question is, can i built this system using ROR? i can imagine > > building it using php. but i really want to learn ROR > > Remember that RoR is a framework and not a language. Compare it to > CodeIgniter, CakePHP, Symphony in the PHP space. > > As to your question: yes, RoR can do that. In fact, your whole project > description is a class example of an MVC based application. If you > have worked with unit and integration tests before in the course of > your education, I would recommend using a BDD or TDD approach for your > Rails app right away. > > > 2.hmm... i was wondering if i print a receipt, if the item list got so > > long, my printer will split the page in two, where the header will be > > print at the first page and no header on the next page. and the length > > of the page is inconsistent if the item list differs.. how do i > > overcome this? i can imagine that the company have already have a > > header printed on the paper first then set the margin for the printer > > to avoid printing on the header. but, i don't think this will amaze my > > lecturer. > > Generate a PDF instead. I would recommend PrinceXML, which you can > just use in demo mode since it's just a school project. PrinceXML > allows you to generate a PDF from HTML+CSS, including all the cases > with headers and footers you correctly indicated as problematic with > just an HTML print. > > > 3.can anyone send me a link where's the best place to read so that i > > can learn more about ROR? > > http://guides.rubyonrails.org/http://peepcode.com/products/test-first-development > > Just google around, there's plenty of Rails related resources out there. > > Best regards > > Peter De Berdt
While I agree with much of what Peter said, I have had extensive experience with generating .pdf files, including PrinceXML. The problems which I experienced with PrinceXML were (a) it requires an "external" step in that you have to generate the .pdf from Prince, based on a file which you created from your ROR application; and (b) you have to manually go into the xml file and "escape" things like "&" signs. Also, Prince requires that you generate a specific .css file (no big deal, but another step). After playing with various other .pdf generation techniques, I landed on the combination of the Prawn gem and the Prawnto plugin, which allow a seamless integration of your ROR application and .pdf output. As far as the issue of "headers" at the start of each page, what I do is to simply start each individual item with a NewPage followed by a Header partial. Good luck with your EOY project, and ROR is definitely the way to go. Sandy -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

