Boosting JavaScript Productivity with SharpKit
What is Productivity?
“Productivity is the act of bringing a company closer to its goal. Every action that brings a company closer to its goal is productive. Every action that does not bring a company closer to its goal is not productive.”
Productivity = Time
Development productivity is measured by the time that it takes implementing new features and bug-fixes.
What's so cool about JavaScript?
Runs everywhere - Desktops, Mobiles
Development Productivity
SharpKit is a C# to JavaScript cross-compiler
How to measure a project?
C#
Lines of code
C#
Server-side code quality
for client-side code!
Is JavaScript considered code?
So what's the solution?
Use a different language and convert
Enhance JavaScript to be fully typed
Impossible right now
JS
What's missing in JavaScript?
Possible today!
Script = Text File
In JavaScript we CAN'T define the types of things!
Code = Structured Compilation Unit
function foo(a,b,c){
a.???
}
Productivity
Lines of Code
Benefits of writing in C#
- Highly advanced syntax (C# 4.0)
- Many similarities to JavaScript
- (Both object-oriented and functional)
- Great design-time (Visual Studio / tools)
- Good chance that is used anyway - no need to learn a new language
- Refactoring
- Find all References
- Code regions
- Xml Documentation
- Compilation
- Validation
- Class diagrams
What makes SharpKit different?
"SharpKit is designed from the ground up with a soft integration model, which allows a risk-free implementation in existing projects"
- Does not require creating a new isolated project
- Does not force adding more references
- Supports any JavaScript coding style
- Generates the same JavaScript that would have been written manually
- Allows reuse of existing client and server code
- PhoneGap
- SenchaTouch
- jQueryMobile
- jQTouch
- Powerful metadata customization
- C# debugging using source maps
- Code minification
- Code consolidation
- Extensible - supports plug-ins
- RxJs
- SignalR
- LinqJs
- TinyMCE
- QUnit
- FullCalendar
- Firebug
- ASP.NET Ajax
- Global functions
- Prototype objects
- JSON
- CLR / Custom classes
- instanceof
- === (exact equals)
- for..in loops
- Native array iteration
- Function pointers
- JavaScript
- HTML5
- JsClr
- jQuery
- jQueryUI
- KnockoutJs
- Sencha ExtJs
- KendoUI
- Classes, Interfaces, Delegates, Enums
- Methods, Fields, Properties, Events
- Generics, LINQ, Lambda-expressions
- Extension methods
- Automatic-properties, anonymous objects
- Object/collection/array initializers
- Ref, out and optional parameters
- Polymorphism, casting,
- foreach, Enumerables, Enumerators
- Exceptions, try...catch...finally, throw, rethrow
- XRegExp
- CodeMirror
- Three Js
- Google Chrome Extensions
- The-M-Project
- Scriptaculous
- Prototype Js
- Highcharts
- Easel Js
- Raphael Js
Thanks!
http://sharpkit.net
danel.khen@sharpkit.net
Any Questions?
It takes time to create new standards
//
It takes time to support them in devices
//
Gain all benefits from both languages
//
Stay typed, easily maintain large code-base
//
Run everywhere, stay standard
//
- The problem
- Possible solutions
- Our solution
- Features
- See it in action!
- Q&A