Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js

73 550 vues

Publié le

Tips and tricks for using MongoDB and Node.js

Publié dans : Technologie
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • Actually you can use SSE (server-sent events) to update user pages without the need of reloading
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • Njce! Thanks for sharing.
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • awesome!
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici
  • Good report!
    __________________________________________________________
    http://taigamejava.org/game-java/tai-game-pikachu-mien-phi-ve-cho-dien-thoai.html
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js

  1. A Guide to the MEAN StackTips and Tricks for using MongoDB and NodeJSin overwhelmingly awesome waysValeri KarpovCTO, Ascot Projectwww.thecodebarbarian.com@code_barbariangithub.com/vkarpov15
  2. What is The Ascot Project?Making fashion geek-friendlyLess like this More like this
  3. Who is this guy?- Academy for Telecommunications andComputer Science 07, Princeton CS 11- Co-founder and CTO, SCVNGR in 08- Google intern 09, mentored by MiskoHevery- Tower Research Capital 11 – 13- Developed Ascot Project at AngelHackDC in 12
  4. What is this all about?- Why Ascot uses MongoDB- Whats the MEAN stack and why its awesome- How MongoDB fits in the MEAN stack- Why MongooseJS is important and tradeoffs in its usage- Example of a cool MEAN stack web app
  5. Why MongoDB?1) Its cool2) No joins for nested data3) Flexible and simple
  6. SQL is Annoying
  7. MEAN StackWeb dev framework for NodeJSSuperheroic frontend frameworkEvent-based concurrency environment
  8. MEAN Stack – Why do I care?- Write one language- With MongoDB and Mongoose, easy and flexible datavalidation- With NodeJS, never need threads- With AngularJS, dynamic client-side templates
  9. Same Language, Same Objects{ "_id" : ObjectId("5161a58b46341f8a46000003"),"username" : "vkarpov" }{ "_id" : "5161a58b46341f8a46000003","username" : "vkarpov" }{ "_id" : "5161a58b46341f8a46000003","username" : "vkarpov" }
  10. How MongooseJS WorksMongooseJS – code-defined schemas for MongoDB + NodeJS- MongoDB and NodeJS are best friends- No built-in schemas or validation- But, MongoDB native wrapper for NodeJS is lacking:
  11. How MongooseJS WorksMongooseJS – code-defined schemas for MongoDB + NodeJSPrimary MongooseJS types:- Schema – structure defining how documents look- Connection – Wrapper around database connection- Model = Schema + Connection + collection name- Document is an instantiation of a Model
  12. How MongooseJS WorksA Basic MongooseJS Schema
  13. How MongooseJS WorksUsing the StockPrice Model
  14. How MongooseJS WorksSometimes being able to save anything isnt right
  15. How MongooseJS WorksHelpful Error Messages- Nested JSON errorssummary- Can use this for verygeneric form validation- More on this later
  16. How MongooseJS WorksNesting and populating MongooseJS Schemas – an importantdistinction that doesnt exist in SQLPopulate – similar to SQL joinNest – re-use schema in anotherschema
  17. How MongooseJS WorksCant do multi-level population!
  18. How MongooseJS WorksNesting and populating MongooseJS SchemasWhen can we use nested schemas?Many-to-oneOne-to-manyOne-to-oneMany-to-many
  19. MEAN Stack SuperpowersNodeJS is not just a Javascript web server- Event based concurrency- Package manager similar to Rails gems- Makes multithreaded servers easy
  20. Example: Bitcoins!
  21. Bitcoin P&LStep 1 : Web app to display a streaming Bitcoin ticker- Complex problem – multiple threads, sockets, mutex, etc.- People in HFT get paid crazy money to do this in C++
  22. Bitcoin P&L- Enter NodeJS, where this is a back-of-napkin type problem
  23. Bitcoin P&L- Update frontend periodically? AngularJS makes it easy
  24. Bitcoin P&LTakeaways- General problem : your server connecting to other servers- Example : Ascot links- Can write multi-threaded servers, but why?- General problem : updating page without reload- AngularJS two-way data binding
  25. Bitcoin P&L + MongoDBModel – list of nested stock schemas Routes – get list of stocks, add a new stock
  26. Bitcoin P&L + MongoDBAngularJS – generic no-reload form wrapper
  27. Bitcoin P&L + MongoDBJade – A View To A Kill And the result:
  28. Takeaways- MEAN Stack is awesome- Sophisticated frontends- Multithreaded backends made easy- MongooseJS helps NodeJS and MongoDB play nice- Limitations on MongooseJS population
  29. Thanks for Listening!Further Reading- Ascot Project : www.ascotproject.com- AngularJS Form Validation : “How to Easily Validate Any FormEver Using AngularJS” @ www.thecodebarbarian.com- SocketIO Bitcoin Price Streaming : mtgox-socket-client on NPMand Github- Bitcoin realtime P&L : github.com/vkarpov15/bitcoin-pnl,coming soon to www.thecodebarbarian.com

×