Open Source -til velsignelse og/eller forbannelse!?
Bård Stranheim Dagli Gleder • 15 år i Hydro • 7 år i Gatsoft • 1 år i Gaiaware
IKT Grenland ”Åpen, blid og skapende”
The RAD Ajax Framework For ASP.NET • Gaia Ajax is an Open Source RAD Ajax Framework for ASP.NET that eases the development of dynamic web applications. Gaia abstracts away JavaScript and allows you to write everything in.NET managed code like C# and VB.NET. • Gaia Ajax is available under Dual Licensing – GPL & Commercial license
Kunder
Åpenhet = risiko • Sikkerhetsnettet = lisenser, avtaler
Tunga rett i munn MITBSDGPLLGPLAGPLCreative Commons PrisesXXXXX(X) Brukes fritt (endres, inngå i kommersielle) X1X1 XX2X2 X Låst til samme lisensXX(X) Kan lukkesXXX3X3 X Oppgi kilde/eierXXX Kan modifiseresX4X4 X4X4 X4X4 X4X4 X 1 Ikke reklame X 2 Hvis ikke-distribusjon X 3 Ikke neste ledd X 4 Må publiseres tilbake
Åpenhet = tillit I • Selv åpenhet om feil og mangler!
Åpenhet = primærbehov • ”Jag trivs best i öppna landskap”
Åpenhet = kvalitet • Vi vil se hvordan det er laget, ikke bare hvordan det virker I
Åpenhet = læring • Tør du vise fram koden din, får du gode råd I
Åpenhet = innovasjon • Innovasjon forutsetter at noe uventet inntreffer • Det vil overraske deg hvem som bidrar
Takk for meg! • og det vil ikke overraske meg om du har funnet feil og mangler i presentasjonen min. Det er jeg glad for! -hvis du vil dele dem med meg: Skype: baard.stranheim tel:
Architecture Diagram Gaia Ajax Core AjaxManager, Ajax Building Blocks, ResponseFilters, Attributes, State Managers ASP.NET 2.0.NET Framework 2.0 and higher. Works in most environments including SharePoint, EpiServer, DotNetNuke, Umbraco, etc... Aspects Draggable, Resizable, Key, Droppable, Hoverable Effects Hide, Show, Move, Shake, Appear, BlindDown Utils XhtmlTextWriter, TagFactory, CssUtils Advanced Controls TreeView, Window, TabControl, Calendar, Accordion Basic Controls Label, Linkbutton, Image, Checkbox I
Architecture • Most controls are inherited from the built-in ASP.NET controls, except when – The base control is poorly implemented – It doesn’t make sense to create the control • (ie. Validators) • Ajax is built directly into the controls • Serializes method calls to client side objects instead of re-rendered markup. Keeping state on the client. • Advanced controls are built on top of the basic building blocks – Dogfooding base controls increases product quality
Key Point $G('ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolder1_Label1').setForeColor('006400,255').setText('50'); Gaia serializes method calls to the client instead of innerHTML
Seamless integration
Advanced controls are built using the base controls
High code quality and consistency Create enterprise applications purely in managed code. No javascript is needed.
Compatibility
A suite of 30+ controls for ASP.NET
IGoogle Sample
VS.NET 2005 and 2008 Integration
Best practice DOM/CSS • All extended controls are written using best practice DOM/CSS. • Custom XhtmlTextWriter ensures 100% valid markup
TreeView DOM
TreeView CSS
Source and Documentation • Source code included • Fully documented
Debugging • Server is extremly easy to debug directly in Visual Studio.NET • Client can sometimes be harder to debug and firebug is a must. – Read XHR responses and requests – DOM inspection – Javascript debugging • What usually goes wrong? – Control not in Controlcollection – Control doesn’t have ID – ReRendering Abuse – Aspects collision
Firebug The best client debugger available
Join the Community Visit Community | Documentation | Tutorials | Blogs | Forum | Samples
Create highly interactive Web Apps This application was created in a few hours with less than 200 lines of code
Extending Gaia • Inheritance – GaiaControl, GaiaWebControl • Composition – Autocompleter, DateTimePicker, Accordion • Container Composition – Window, ExtendedPanel • Custom Extension w/ javascript file – Calendar, InPlaceEdit, Toolbar
Inheritance • Inherit from any control that implements IAjaxControl
Composition
Container Composition • Inherit from HybridPanelBase • Add composite controls to CompositionControls collection
Custom Extensions • Easily create custom extension controls – Attach.js files that will be dynamically included – Map Server To Client methods and viceversa – Managed XhtmlTextWriter for ensured xhtml
Include scripts and initialize control
Send properties from server to client
Calling methods from client
Familar concepts
TabControl
Window
TreeView
AutoCompleter
ASP.NET GridView Ajaxified
Toolbar/Menu
Accordion w/ExtendedPanels
Transparent Development