On Sunday, July 26, 2015 at 6:46:05 PM UTC+3, Aria Stewart wrote: > > On Sunday, July 26, 2015 at 10:00:11 AM UTC-4, John English wrote: >> >> I am a complete newbie here, so please forgive my total ignorance of >> Node.js. >> > > No worries! Newbies are welcome! >
Great... so I'll probably be back again later my more questions... :-) > (d) are there any pitfalls I need to be aware of? > > Beware of the aforementioned module system mismatches, and don't get > caught up in too much class focused design if your app doesn't really need > it. > > Handle code and data separately -- code you'll want to send through the > module system and loader, data you'll want to fetch with the XMLHttpRequest > and wrapping libraries in, the browser, and handle it explicitly. > Well, I'm basically going to try and rewrite the Java code in JS rather than redesigning it all. However, I've had a play using Node.js and so far I can save and reload with the proper "class" (prototype) -- a bit messy as I need to set a "type" field in every constructor to do this, and bodging "transient" fields with naming conventions so I can exclude them from the JSON -- so I'm hopeful it won't be too stressful. The code/data separation is basically much like Java -- class loaders load class code, serialization handles the data. Thanks for the tips on module loaders, that's probably the next step... And many thanks for the other tips, and a very helpful reply! -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/de2ad91a-ae73-450b-8e5e-509531e0182f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
