From closures to prototypes, part 2

Posted by: More Whidbey stuff, on 14 Oct 2006 | View original | Bookmarked: 0 time(s)

In part 1 of this post, I exposed the differences between the closure and the prototype patterns to define JavaScript classes. In this post, I'll show the shortest path to convert an existing class built using Atlas and closures to a prototype-based class. I'll also show a few caveats that you need to be aware of.Here's an example of a class built using the July CTP of Atlas:Custom.Color = function(r, g, b) { Custom.Color.initializeBase(this); var _r = r || 0; var _g = g || 0; ...

Category: Ajax | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 974 | Hits: 93

Similar Posts

  • Introducing SharePoint 2010 Training at U2U more
  • The Underground at PDC more
  • My History of Visual Studio (Part 6) more
  • BeginDialOut with Office Communicator Clients more
  • DotNetNuke Fusion Results for Q3 more
  • GiveCamps Get a new Sponsor more
  • Announcing the WebsiteSpark Program more
  • Scenarios for WS-Passive and OpenID more
  • More On The CodePlex Foundation more
  • Foxit PDF Previewer update more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD