Re: [nodejs] Sample CRUD app source code

2012-05-31 Thread Angel Java Lopez
Well... my next suggestion is to use header and footer from static files. Then, the example could be For static files, a code like http://stackoverflow.com/questions/4062260/nodejs-redirect-url could be used. Some static text could contains something to be replace (usually, the title at ...) Fir

RE: [nodejs] Sample CRUD app source code

2012-05-31 Thread Glenn Block
odejs] Sample CRUD app source code On May 31, 2012, at 10:23, Glenn Block wrote: > Angel was looking to not use io, but yes you definitely could. If the only goal is to avoid reading a file at server startup, then for myself I don't find that a worthwhile goal and would continue to use a

Re: [nodejs] Sample CRUD app source code

2012-05-31 Thread Ryan Schmidt
On May 31, 2012, at 10:23, Glenn Block wrote: > Angel was looking to not use io, but yes you definitely could. If the only goal is to avoid reading a file at server startup, then for myself I don't find that a worthwhile goal and would continue to use a separate html file for clarity. > As t

RE: [nodejs] Sample CRUD app source code

2012-05-31 Thread Glenn Block
AM To: nodejs@googlegroups.com Subject: Re: [nodejs] Sample CRUD app source code Why do you put the html source in a JavaScript comment, then parse it out? That seems very weird to me. Why not just a JavaScript string? Or why not store it in a separate .html file that's read into memory at startu

Re: [nodejs] Sample CRUD app source code

2012-05-31 Thread Ryan Schmidt
Why do you put the html source in a JavaScript comment, then parse it out? That seems very weird to me. Why not just a JavaScript string? Or why not store it in a separate .html file that's read into memory at startup? On May 31, 2012, at 09:35, Glenn Block wrote: > Not sure you want to use thi

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread Angel Java Lopez
Ok, but without using libraries: - You must implement the route analysis, parsing of parameters, body post, serving static files (text, images...), etc.. - Do you want to use a database, or an in memory model? Or maybe, a model serialized in JSON? That is, you are interested more in manage the int

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread john.tiger
Tim, why don't you pick one of the standard examples (todo, blog) - this would make it easy to compare to other languages, frameworks, etc On 05/30/2012 10:13 AM, Tim Caswell wrote: If you write up the requirements for the simple app I can write up an example. I need this for talks I give a

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread Adem Aydin
Hi Tim, my main goal is to write a rating system and play with the aggregated data (i.e. compare the rating of items of the same type, a rating timeline of one item and so on). But to reach this goal, I need to learn how to write a basic list which can be extended and how to edit or delete exis

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread ben
sorry didn't see that you want to do it without any lib. just ignore the last post. On Thu, May 31, 2012 at 1:35 AM, ben wrote: > this might help > https://github.com/dreamerslab/express-todo-example > > also there is an online demo > http://express-todo-example.dreamerslab.com/ > > ben :) > > On

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread ben
this might help https://github.com/dreamerslab/express-todo-example also there is an online demo http://express-todo-example.dreamerslab.com/ ben :) On Thu, May 31, 2012 at 12:13 AM, Tim Caswell wrote: > If you write up the requirements for the simple app I can write up an > example.  I need th

Re: [nodejs] Sample CRUD app source code

2012-05-30 Thread Tim Caswell
If you write up the requirements for the simple app I can write up an example. I need this for talks I give anyway, but I have trouble coming up with the sample apps. Just keep it simple. What are you trying to learn exactly? On Wed, May 30, 2012 at 10:47 AM, Adem Aydin wrote: > Hello, > As a

[nodejs] Sample CRUD app source code

2012-05-30 Thread Adem Aydin
Hello, As a node.js novice I am trying to get myself working productively with it. However, I'm still searching for a sample CRUD application which is purely built without any libraries. This would allow me to see how to handle routes, GET/POST requests and HTML templating WITHOUT express.js etc