Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Real World HTML5 + ASP.NET MVC - Lessons Learned
1. REAL WORLD HTML5 & MVC
LESSONS LEARNED
Zoltán Dávid
david.zoltan@aut.bme.hu
György Balássy
balassy@aut.bme.hu
2. AGENDA
The story
HTML5 games
Don’t write, sketch
HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned
16. Many project experiences
• Web Development
• ASP.NET WebFroms
• MS SQL
• Entity Framework
• Visual Studio
From the ivory tower
• ASP.NET MVC
• Razor Syntax
• Azure
• HTML5 sitebuild
• Game development
• Javascript Application
development
19. AGENDA
The story
HTML5 games
Don’t write, sketch
HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned
22. GRAPHICS
<canvas id="game" width="600" height="480">
canvas not supported…
</canvas>
var canvas = document.getElementById('game');
var context = canvas.getContext('2d');
var pipe= new Image();
pipe.src = 'pipe.png';
context.drawImage(pipe,x,y);
23. ANIMATIONS
var timer = window.setInterval(draw,50);
function draw() {
now = new Date().getTime();
deltat = now – prevtime;
// compute x,y and draw
prevtime = now;
}
25. LARGE JS APPLICATIONS
• Feature detection
• Polyfills
• Structuring code
• Code quality
• Bullet-proof Ajax
• Debugging
That’s not your var
JavaScript best practices
for C# developers
Download from:
http://bit.ly/msbg2012
26. AGENDA
The story
HTML5 games
Don’t write, sketch
HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned
30. AGENDA
The story
HTML5 games
Don’t write, sketch
HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned
32. AGENDA
The story
We are no game developers
Don’t write, sketch
Viable HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned
33. WE HAVE A QUESTION
How to transform sitebuild to MVC code?
35. WebForms
• Url maps to file (.aspx)
• File has Controls
• You parameterize
Controls
• Controls render HTML
MVC
• Url maps to C# Method of
a Class
• You choose an HTML
rendering template
• You collect data for the
template
• You feed the template
with the data
Routing
Action
Controller
View
Model
UNDERSTANDING MVC
39. EXPERIENCE
• Lots of data transformation code
• No HTML or javascript problems
• AJAX was extremly easy to integrate
• Using the sitebuild was straightforward
40. AGENDA
The story
HTML5 games
Don’t write, sketch
HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned
44. CASE SENSITIVE URLS
• windows developers not used to it
• problem for
• javascript games
• developed on windows box
shot[1] = new Audio('sound/shot.mp3');
shot[1].volume = 0.3;
shot[2] = new Audio('sound/shot.mp3');
shot[2].volume = 0.3;
48. AGENDA
The story
HTML5 games
Don’t write, sketch
HTML5 sitebuild
A good server-side for a good sitebuild
Cloud – a place to put your stuff
Conclusions & What we learned