Windows 8: HTML5 and AJAX/JavaScript == Modern UIs
samgentile.com
samgentile.com
Adobe Flex/AIR was probably the best client UI dev experience I've had. MXML and Actionscript 3 is VERY similar to HTML/JS. Given the benefits of so many platforms moving towards HTML/JS as a kind of common language for UI development, these are exciting times.
On the other hand, frameworks such as UIKit provide all you need for a nice-looking UI. Developers just need to worry about the application code, and worry about UI design much later in the process.
Perhaps "expressive" would be a better distinction. Javascript is a much more expressive language, meaning that I have to do a lot less work to accomplish the same end.
-performSelector: takes a selector string, and its variants allow you to pass objects as arguments. I'm not sure why you think it involves C types or why you cite it as the feature that makes Objective-C dynamic (there's considerably more to it than that).
It's basically Cocoa on javascript using Objective-J
//Objective-C
#import <Foundation/Foundation.h>
@interface Order : NSObject {
NSString *id;
Customer *customer;
NSDate *timestamp;
NSString *productId;
}
@property (nonatomic, retain) NSString *id;
@property (nonatomic, retain) Customer *customer;
@property (nonatomic, retain) NSDate *timestamp;
@property (nonatomic, retain) NSString *productId;
@end
#import "Order.h"
@implementation Article
@synthesize id;
@synthesize customer;
@synthesize timestamp;
@synthesize productId;
- (void)dealloc
{
[self setId:nil];
[self setCustomer:nil];
[self setTimestamp:nil];
[self setProductId:nil];
[super dealloc];
}
//Javascript
Order = Proto.clone().newSlots("id", "customer", "timestamp", "productId");Then I started coding in PyQt (a Python, Qt bridge). Now I know: Objective-C is not a high level language, even though it has some high level aspects. Also, coding in a high level language can improve productivity by a huge margin, even if you are coding against a low level framework.
On the desktop, this is a more than worthwhile tradeoff. Mobile devices still benefit from the performance advantage of Objective-C as opposed to, say, MacRuby.
Getting rid of "Too much work" is the point of software.
// Order.h
#import <Foundation/Foundation.h>
@interface Order : NSObject
@property (copy) NSString *id;
@property (retain) Customer *customer;
@property (copy) NSDate *timestamp;
@property (copy) NSString *productId;
@end
// Order.m
#import "Order.h"
@implementation Article
@synthesize id;
@synthesize customer;
@synthesize timestamp;
@synthesize productId;
@end
Apple engineers have confirmed that they're working on making @synthesize the default behavior for properties, so eventually you won't have to write that either. A real-world app would be using Core Data for its model objects, negating the need to write this class at all while adding automatic faulting, data integrity, and undo/redo: Order *order = [NSEntityDescription insertNewObjectForEntityForName:@"Order"
inManagedObjectContext:self.managedObjectContext];HTML/JS/CSS has been the worst UI experience I've had, I'm interested to read how this has changed. It's gotten increasingly better since jQuery was released but still feels like pulling teeth working with cross browser hacks.
Given that, HTML/JS/CSS is quite good. And the obvious benefit is your code will run everywhere.
Is there any information on what development model MS is thinking about?
Interesting. Source?
> It seems unlikely that MS would have worse tooling than Google, particularly given that MS can leverage their development tools (.NET + future compiler as a service).
It would not be hard to build a .NET to JS compiler as a parallel to GWT. In fact there are already a few such projects, one of them even a Microsoft one (Volta).
I would not be surprised to see Microsoft put some effort behind such a project. However there have been no indications so far.