SlideShare ist ein Scribd-Unternehmen logo
1 von 18
Teaching Old JavaScript New Tricks Experiences building a server-side JavaScript framework
Old JavaScript Over 15 years old Implemented everywhere: Browsers, Web Servers, Scripting, Phones Server Implementations (Old): Netscape, Rhino (JVM), Microsft IIS Old JavaScript feels “old” Namespacing, polluted globals, poor inheritance, not very modular.. Those platforms don’t give you much
New and Modern Tricks Modules, Namespacing “Separation of Concerns” Model, View, Controller (MVC): Request Routing (Controller) Object Relational Mapping (Model) Templating (Views) Binary, UTF-8, JSON, Callbacks Concise and Elegant
Microsoft Javascript JScript on IIS (ASP) Not modern or cool, but old, stable and Windows hosting can be found everywhere JScript.dll updated with IE (up to 8) so it’s not ancient Not JScript.NET, not JIT, but quick enough (compared to other interpreters of it’s era)
Why JS on the Server Code re-use, sure.. Real strength: Heaps of stuff already written and tested: Parsers, Crypto, ORM, Testing, etc. (I’ve even seen a Linux Emulator) Expressive and Powerful: Callbacks/handlers, Query Iteration, flexible inheritance, extendibility (override built-in methods) Poor dates, formatting, etc. But easily fixed.
The Framework Event Binding Bind to the “ready” event to attach controller code / route handlers Routes: Sinatra-style; named parameters Modules: load modules similar to common-JS Templating: compile your data in the route handler and then use template module to render your view Data Models: create your models, validation, methods and relationships Clean separation of code, helpful, intuitive interface
Into the Code Hello World:
Named Parameters Access to URL params Automatic JSON Output
Using Libraries Similar to require() but uses lib()
Application Structure /app /config /controllers /models /system /views /assets Public files (css, images, etc)
Now the Cool Stuff ActiveRecord for JavaScript Powerful modeling, no writing SQL HTML Parser, DOM implementation and jQuery on the Server Read html files from file system and populate with dynamic content Webpage scraping with ease Node.js based dev-server Uses windows scripting host behind Node to use framework without Schema-less doc-store, Binary, Crypto, Advance language/full-text-search features, Persistent sessions with namespacing, etc.
ActiveRecord Models are defined inside app/models Ported from Aptana’sActiveJS
Model Validation and Relationships hasOne, hasMany, belongsTo validatesPresenceOf, validatesUniquenessOf, validatesLengthOf, etc Custom Validation functions and getter Methods
Creating, Updating and Finding See Code
jQuery Server Side DOM See Code
Weaknesses and Future Development Needs better testing library (qunit) Debugging could be easier SQLite Adapter almost Working on adapters for other Server JS platforms (Apache + v8, Rhino on JVM) Good abstraction layers makes it not too closely coupled to current platform
Wrapping Up What can be learned from Do It Yourself Not Re-inventing the Wheel Re-using other open-source code Github: http://github.com/sstur/aspjs
Teaching old java script new tricks

Weitere ähnliche Inhalte

Was ist angesagt?

Increase automation to rest
Increase automation to restIncrease automation to rest
Increase automation to restvodQA
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCAnton Krasnoshchok
 
Web testing with selenium and by quontra solutions
Web testing with selenium and  by quontra solutionsWeb testing with selenium and  by quontra solutions
Web testing with selenium and by quontra solutionsQUONTRASOLUTIONS
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREnearlearn
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREnearlearn
 
Spring framework 3.2 > 4.0 — themes and trends
Spring framework 3.2 > 4.0 — themes and trendsSpring framework 3.2 > 4.0 — themes and trends
Spring framework 3.2 > 4.0 — themes and trendsArawn Park
 
Introduction To JavaScript Ajax
Introduction To JavaScript AjaxIntroduction To JavaScript Ajax
Introduction To JavaScript AjaxReema
 
Ch. 13 filters and wrappers
Ch. 13 filters and wrappersCh. 13 filters and wrappers
Ch. 13 filters and wrappersManolis Vavalis
 
20101220架構討論
20101220架構討論20101220架構討論
20101220架構討論Kyle Lin
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Frameworkwebholics
 

Was ist angesagt? (20)

Rest api with node js and express
Rest api with node js and expressRest api with node js and express
Rest api with node js and express
 
Beginning In J2EE
Beginning In J2EEBeginning In J2EE
Beginning In J2EE
 
Increase automation to rest
Increase automation to restIncrease automation to rest
Increase automation to rest
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 
003. ReactJS basic
003. ReactJS basic003. ReactJS basic
003. ReactJS basic
 
Ember Data
Ember DataEmber Data
Ember Data
 
Web testing with selenium and by quontra solutions
Web testing with selenium and  by quontra solutionsWeb testing with selenium and  by quontra solutions
Web testing with selenium and by quontra solutions
 
Zend framework 02 - mvc
Zend framework 02 - mvcZend framework 02 - mvc
Zend framework 02 - mvc
 
Introduction to Node.JS
Introduction to Node.JSIntroduction to Node.JS
Introduction to Node.JS
 
Ch. 11 deploying
Ch. 11 deployingCh. 11 deploying
Ch. 11 deploying
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALORE
 
React js TRAINING IN BANGALORE
React js TRAINING IN BANGALOREReact js TRAINING IN BANGALORE
React js TRAINING IN BANGALORE
 
Spring framework 3.2 > 4.0 — themes and trends
Spring framework 3.2 > 4.0 — themes and trendsSpring framework 3.2 > 4.0 — themes and trends
Spring framework 3.2 > 4.0 — themes and trends
 
Nodejs + Rails
Nodejs + RailsNodejs + Rails
Nodejs + Rails
 
Introduction To JavaScript Ajax
Introduction To JavaScript AjaxIntroduction To JavaScript Ajax
Introduction To JavaScript Ajax
 
Ch. 13 filters and wrappers
Ch. 13 filters and wrappersCh. 13 filters and wrappers
Ch. 13 filters and wrappers
 
Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?Whats New In Spring 3.0 ?
Whats New In Spring 3.0 ?
 
20101220架構討論
20101220架構討論20101220架構討論
20101220架構討論
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Framework
 
Web Workers
Web WorkersWeb Workers
Web Workers
 

Ähnlich wie Teaching old java script new tricks

Full stack Java Developer
Full stack Java DeveloperFull stack Java Developer
Full stack Java DeveloperMdHasan872214
 
Sofea and SOUI - Web future without web frameworks
Sofea and SOUI - Web future without web frameworksSofea and SOUI - Web future without web frameworks
Sofea and SOUI - Web future without web frameworksAndré Neubauer
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server ArchitecturesPedro Melo Pereira
 
Server-side Web development via Ruby on Rails
Server-side Web development via Ruby on RailsServer-side Web development via Ruby on Rails
Server-side Web development via Ruby on Railsg3ppy
 
Ram Kumar - Sr. Certified Mule ESB Integration Developer
Ram Kumar - Sr. Certified Mule ESB Integration DeveloperRam Kumar - Sr. Certified Mule ESB Integration Developer
Ram Kumar - Sr. Certified Mule ESB Integration DeveloperRam Kumar
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsVictor Porof
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN StackRob Davarnia
 
Sid K
Sid KSid K
Sid KSid K
 
Rajiv ranjan resume-us
Rajiv ranjan  resume-usRajiv ranjan  resume-us
Rajiv ranjan resume-usRajiv Ranjan
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsMike McNeil
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesUdita Plaha
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh Dasari
 
Resume - Shashesh Silwal
Resume - Shashesh SilwalResume - Shashesh Silwal
Resume - Shashesh SilwalShashesh Silwal
 
Intro to-html-backbone
Intro to-html-backboneIntro to-html-backbone
Intro to-html-backbonezonathen
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jibanJibanananda Sana
 

Ähnlich wie Teaching old java script new tricks (20)

Full stack Java Developer
Full stack Java DeveloperFull stack Java Developer
Full stack Java Developer
 
Sofea and SOUI - Web future without web frameworks
Sofea and SOUI - Web future without web frameworksSofea and SOUI - Web future without web frameworks
Sofea and SOUI - Web future without web frameworks
 
Ranjith_Reddy Yallampalli Resume
Ranjith_Reddy Yallampalli ResumeRanjith_Reddy Yallampalli Resume
Ranjith_Reddy Yallampalli Resume
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
 
Server-side Web development via Ruby on Rails
Server-side Web development via Ruby on RailsServer-side Web development via Ruby on Rails
Server-side Web development via Ruby on Rails
 
Ram Kumar - Sr. Certified Mule ESB Integration Developer
Ram Kumar - Sr. Certified Mule ESB Integration DeveloperRam Kumar - Sr. Certified Mule ESB Integration Developer
Ram Kumar - Sr. Certified Mule ESB Integration Developer
 
Beginners' guide to Ruby on Rails
Beginners' guide to Ruby on RailsBeginners' guide to Ruby on Rails
Beginners' guide to Ruby on Rails
 
Beginning MEAN Stack
Beginning MEAN StackBeginning MEAN Stack
Beginning MEAN Stack
 
Vishnu(java)
Vishnu(java)Vishnu(java)
Vishnu(java)
 
Node.js vs Play Framework
Node.js vs Play FrameworkNode.js vs Play Framework
Node.js vs Play Framework
 
Sid K
Sid KSid K
Sid K
 
Bhargav
BhargavBhargav
Bhargav
 
Rajiv ranjan resume-us
Rajiv ranjan  resume-usRajiv ranjan  resume-us
Rajiv ranjan resume-us
 
Node PDX: Intro to Sails.js
Node PDX: Intro to Sails.jsNode PDX: Intro to Sails.js
Node PDX: Intro to Sails.js
 
Crash Course HTML/Rails Slides
Crash Course HTML/Rails SlidesCrash Course HTML/Rails Slides
Crash Course HTML/Rails Slides
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
 
Resume - Shashesh Silwal
Resume - Shashesh SilwalResume - Shashesh Silwal
Resume - Shashesh Silwal
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Intro to-html-backbone
Intro to-html-backboneIntro to-html-backbone
Intro to-html-backbone
 
Introduction to node.js by jiban
Introduction to node.js by jibanIntroduction to node.js by jiban
Introduction to node.js by jiban
 

Kürzlich hochgeladen

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Kürzlich hochgeladen (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

Teaching old java script new tricks

  • 1. Teaching Old JavaScript New Tricks Experiences building a server-side JavaScript framework
  • 2. Old JavaScript Over 15 years old Implemented everywhere: Browsers, Web Servers, Scripting, Phones Server Implementations (Old): Netscape, Rhino (JVM), Microsft IIS Old JavaScript feels “old” Namespacing, polluted globals, poor inheritance, not very modular.. Those platforms don’t give you much
  • 3. New and Modern Tricks Modules, Namespacing “Separation of Concerns” Model, View, Controller (MVC): Request Routing (Controller) Object Relational Mapping (Model) Templating (Views) Binary, UTF-8, JSON, Callbacks Concise and Elegant
  • 4. Microsoft Javascript JScript on IIS (ASP) Not modern or cool, but old, stable and Windows hosting can be found everywhere JScript.dll updated with IE (up to 8) so it’s not ancient Not JScript.NET, not JIT, but quick enough (compared to other interpreters of it’s era)
  • 5. Why JS on the Server Code re-use, sure.. Real strength: Heaps of stuff already written and tested: Parsers, Crypto, ORM, Testing, etc. (I’ve even seen a Linux Emulator) Expressive and Powerful: Callbacks/handlers, Query Iteration, flexible inheritance, extendibility (override built-in methods) Poor dates, formatting, etc. But easily fixed.
  • 6. The Framework Event Binding Bind to the “ready” event to attach controller code / route handlers Routes: Sinatra-style; named parameters Modules: load modules similar to common-JS Templating: compile your data in the route handler and then use template module to render your view Data Models: create your models, validation, methods and relationships Clean separation of code, helpful, intuitive interface
  • 7. Into the Code Hello World:
  • 8. Named Parameters Access to URL params Automatic JSON Output
  • 9. Using Libraries Similar to require() but uses lib()
  • 10. Application Structure /app /config /controllers /models /system /views /assets Public files (css, images, etc)
  • 11. Now the Cool Stuff ActiveRecord for JavaScript Powerful modeling, no writing SQL HTML Parser, DOM implementation and jQuery on the Server Read html files from file system and populate with dynamic content Webpage scraping with ease Node.js based dev-server Uses windows scripting host behind Node to use framework without Schema-less doc-store, Binary, Crypto, Advance language/full-text-search features, Persistent sessions with namespacing, etc.
  • 12. ActiveRecord Models are defined inside app/models Ported from Aptana’sActiveJS
  • 13. Model Validation and Relationships hasOne, hasMany, belongsTo validatesPresenceOf, validatesUniquenessOf, validatesLengthOf, etc Custom Validation functions and getter Methods
  • 14. Creating, Updating and Finding See Code
  • 15. jQuery Server Side DOM See Code
  • 16. Weaknesses and Future Development Needs better testing library (qunit) Debugging could be easier SQLite Adapter almost Working on adapters for other Server JS platforms (Apache + v8, Rhino on JVM) Good abstraction layers makes it not too closely coupled to current platform
  • 17. Wrapping Up What can be learned from Do It Yourself Not Re-inventing the Wheel Re-using other open-source code Github: http://github.com/sstur/aspjs