Now on Google Code

23May07
Posted by Alex

I have become increasingly busy (a.k.a. lazy), and no longer wish to maintain a darcs repository or setup some sort of issue tracking. So I have left that up to google. The project is now hosted over at http://code.google.com/p/inheritance/.

Over the next few days I will be updating the project page hosted here and moving more things over to google code. As of right now, the entire source tree is in revision control over there along with the latest 2.3 version download (contains the new Singleton stuff).

Feel free to start leaving tickets.

UPDATE: I got a little ahead of myself here. I accidently let some experimentation code into the 2.3 release. If you have already downloaded the 2.3 release please upgrade to version 2.4.

Continue reading ‘Now on Google Code’

Support for Singletons Added

23May07
Posted by Alex

I recently received an emailed from Nicholas Barthelemy of http://www.nbarthelemy.com regarding a little method he had written for creating Singletons with my inheritance library. Using Singletons in Javascript is something I do quite frequently, but I have always thought about them in the traditional Javascript sense (more on this later). I’d like to thank Nicholas for sending his email and for sparking my interest in adding support for the more classical style of Singleton.

Now without further ado, for your coding pleasure…I introduce Class.singleton!

Continue reading ‘Support for Singletons Added’

Long awaited project page arrives

11Mar07
Posted by Alex

Well, I finally got rid of my laziness. Well, at least for most of the weekend. The lame Inheritance.js project page has finally been updated. There is now some real content there, not just some lame page saying there is “more to come in just a little while”. Head on over to pick up the javascript file and see the latest explanation of what Inheritance.js can do for you.

What’s in store for the future? Well, I’ve decided that I want to devote a portion of my free time, no matter how little there is, to working on open source software. I feel that I have a lot more I could contribute to the community of developers out there. I have my eyes on a few specific projects that I would like to get involved with, but we shall see if that works out. In terms of what the future holds for Inheritance.js, well I plan to get some sort of issue tracking system up in place. I don’t expect there to be many issues, but inevitably there will be. An issue tracking system would also be a great place for people to post suggestions for improvements and other ideas regarding the enhancement of this library. So stay tuned over the next little while for another update in that regard.

As a side note, I have submitted Inheritance.js as one of Prototype’s “best built-with-Prototype third-party libraries”. With any luck, hopefully you’ll see Inheritance.js on the official Prototype list when it comes out.

Photoshop CS3 Beta

18Dec06
Posted by Dan

As you may already know, Adobe Labs has released a beta version of Photoshop CS3. A lot of Mac Photoshop users, myself included, would have been happy enough with (or at least of been foolish enough to pay the upgrade price for) a repackaged version of Photoshop CS2 that runs natively Apple’s new Intel-based hardware. Adobe, however, perhaps due to Macromedia’s influence, is really being innovative this time around! Photoshop CS3 appears as though it really deserves the major version number increase, and the best way to preview all (or at least most of) the improvements is definitely Deke McClelland’s Photoshop CS3 Beta One-on-One Preview. The new interface, the quick selection tool, non-destructive filters, and smart filter masks are enough to make me cry…

Believe it or not, the final version of Internet Explorer 7 was released yesterday, more than five years after version 6. It’s so new in fact, and was released with such little fanfare, that most of the computer and technology news sites that I subscribe to haven’t even reported on it yet. Hell, even Microsoft’s own IE Add-Ons website has yet to be updated and still has a link to “get the beta”.

This is a momentous ocassion, but I can’t help feeling less than impressed. An integrated RSS reader and tabbed browsing (seriously, what’s the deal with IE7’s ugly “new tab” button/tab/thingy?) are two of the most “exciting” new features, but seeing as how they probably won’t be used by a lot of people (I know some people who use Firefox and even they don’t know what browser tabs are), the biggest and most important part of this update for Microsoft was, without a doubt, to make IE more secure. For years, Microsoft achilles’ heel has been IE6’s vulnerability to hackers and spyware, but isn’t it crazy that it took them so long to “fix” this issue? Only time will tell exactly how much more secure IE7 is compared to IE6, but I hope for everyone’s sake that it’s as secure as Microsoft claims.

Security aside, the biggest improvement that Microsoft has made for end users is an updated user interface (including the addition of browser tabs). That said, I’m definately using the word “improvement” loosely here. Among other things, I just can’t believe that IE7’s menu bar (File, Edit, etc.) is hidden by default. Windows users, especially those less geeky than myself, are comfortable with the menu bar, and I think that hidding from them is a mistake. Is this a subtle way to familiarize users with the Windows Vista user interface? Perhaps, but seeing as how Microsoft has already announced that Vista’s version of IE7 will be different than XP’s version I don’t understand why they’ve decided to throw XP users for a loop like this. Then again, most people were thinking that IE7 and Vista would ship at the same time, so maybe shipping IE7 earlier than Vista really is part of Microsoft’s strategy to get users ready for the user interface overhaul that Vista is bringing to the party.

All of that said, the time (that we have dreaded) has come for web designers and developers the world over to update to IE7 and take our websites (existing websites and work in progress) out for a spin! In my experience, having just installed the update a couple of hours ago, all of the websites that I’ve created in the past year or so are working (almost) flawlessly. Thanks to conditional comments the few tweaks that are required to fix the IE7 display glitches that I’ve encoutered won’t even affect older versions.

This is Twologic

16Oct06
Posted by Dan

If you’re visiting this website using a web browser (as opposed to reading our RSS feed), you may have already noticed that we’ve spiced things up a bit. Although we haven’t had time to put together a “real” website yet (you know, something more than just a blog), we did slice out a bit of time to customize Ben Gray’s excellent Unsleepable WordPress theme. That said, this website doesn’t resemble the default Unsleepable look very much, and you may not have noticed any similarities whatsoever… in which case I could’ve just kept my mouth shut.

The design of this website aside, the bigger “announcement” we’re making with this update is the grand unveiling of Twologic’s brand/identity/logo (whatever you want to call it)! Alex and I went through the rigorous process of designing a logo for ourselves over a year and a half ago (has it really been that long). Needless to say, were very excited to finally be presenting this to you today. I won’t bore you with the details, as the logo itself is rather simple — a stylized number “2″ is contained withing a square, and has been rotated 90 degress to the left. The associated wordmark is also simple, and the typographic treatment emphasizes that “two” and “logic” should be read as seperate words (it’s “Two-law-gick”, not “Two-luh-gick”).

More design oriented weblog posts are to come now that I’m getting “my blog on”, so stay tuned!

Prototype Patch Re-submitted

17Sep06
Posted by Alex

Well I finally got off my high horse and made some time to build out a collection of unit tests for my inheritance library. I took the latest code along will all the newly written unit tests and bundled them into a nice patch for prototype. I re-attached them to my original patch so hopefully it will be included in a future version.

Now that I have your attention, I thought I’d spend a bit of time to discuss some code I discovered while building out this latest set of unit tests. While looking through the scriptaculous unit testing suite I found a neat little entry at the bottom of unittest.js. I’m not sure when it was added, so if this is really old news I apologize for being behind the times.

Continue reading ‘Prototype Patch Re-submitted’

Updated OO Library

26Jul06
Posted by Alex

It has been a while since I last posted and I just wanted to make a quick announcement. Version 2.2 of my Ruby style OO library is now ready for public consumption. It has been sitting around in my darcs repository for a good little while now. This new version is functionally identical to the version I last blogged about. The only change I have made is a slight alteration based on some feedback I received from Justin Palmer of EncyteMedia.

In this new version I renamed Class.create to Class.extend, but before you go off on a frantic search and replace. Don’t worry, because even though the Class.create method is now deprecated, it won’t disappear for a little while.

So what prompted me to make this change?

Continue reading ‘Updated OO Library’

Javascript OO Ruby Style

17Jun06
Posted by Alex

This is a follow up post regarding the OO inheritance javascript library I blogged about earlier. I planned on submitting my original work as a patch to Prototype. Before submitting my patch at the rails development site I checked out the competition. I found a couple OO implementations already in contention for the next major version of Prototype. For the curious, both of them are mentioned on Sam Stephenson’s weblog.

I spent some time looking over both solutions. Each one tried and did a very good job of implementing OO features, but they both had parts I didn’t like. One author thought it would be neat to add support for private methods. This is neat, but I don’t think javascript really needs this. People have been writing javascript for years without it and every attempt I’ve seen to add it to the language has seemed kind of hackish, well at least to me. You’ll find my biggest beef with both libraries when you inspect an instance of one of your classes. You’ll find a couple added methods and properties that the library injects so that it can do it’s job. In fact even my previous OO library was guilty of this, something that bugged me to no end.

So I sat down one evening and rewrote the core of my own library to meet all my demands and expectations. I am proud to say that the new library is much smaller, sleeker and generally just feels better than the first. I also added some neat new features along the way.

Visit the project page for details on how to get the library.

Continue reading ‘Javascript OO Ruby Style’

Object Inheritance with Javascript

23May06
Posted by Alex

Recently I’ve been spending a lot of my time experimenting with and writing web-applications powered by a fair bit of Javascript. I’ve toyed with a couple of the new big hitters in the world of Javascript; namely Prototype1 and MochiKit2. If you haven’t heard of either library, I encourage you to take a peak and explore them both. They provide a large set of useful functions and features that will help to save you time when writing your own Javascript. I’m not about to discuss which one is better than the other, nor am I going to do a feature comparison between both libraries. There are plenty of articles and blog posts that already do just that. Instead I am going to focus on something else; something that neither of those two libraries really help with. I am going to focus on writing Object-Oriented Javascript.

There are a lot of pitfalls and not so attractive code that is needed in order to accomplish certain OO tasks in Javascript. I’ve written a little library that I think helps to simplify all this. However, before I get into the details of my own work, I think a little background is in order. Of course, you could skip right down to it if you are already familiar with the pitfalls of writing OO in Javascript.

Continue reading ‘Object Inheritance with Javascript’