My favorites | Sign in
Project Logo
                
Show all Featured wiki pages:
ReleaseNotes
People details
Project owners:
  wolfgang.frank, PFriese, MWuendsch
Project committers:
a-f...@gmx.de, HeikoBehrens137, mic.kl...@gmx.de, Kopf.Markus
Project contributors:
mathieubruning

iPhonical

Model Driven Software Development for the iPhone

The iPhonical project provides a rapid prototyping development process as well as an Eclipse-Plugin (based on Xtext) that offers a simple Domain Specific Language (iPhonical DSL) for describing iPhone applications. The created models based on this DSL are the input for an openArchitectureWare code generator which creates various ObjectiveC artifacts in order to accelerate iPhone development and improve the quality of the ObjectiveC code by replacing a lot of glue code with generated code.

Generated artifacts are things like:

These things are generated in a layered architectural style that should reduce the need to manipulate any generated code. Using Categories and Subclasses should be all that's needed to program the (manual) rest of the application.

The generated code has dependencies to the following open source projects which provide some excellent APIs to use (see links for more info):

Getting started

see here

Usage examples for iphonical DSL:

iphonicalModel iDriveLog {
	
        ...

	entity Car {
		String name;
		String number;
		Integer km;
		JourneyEntry * journeys;
	};
	
	
	entity JourneyEntry {
		Location startLocation;
		Location endLocation;
		String comment;
		Integer startKm;
		Integer endKm;
		Car car;
		Driver driver;
		Reason reason;
	};
	
	entity CarDataResponse {
		String creationDate;
		Car car;
		Location location;
		JourneyEntry journey;
		Driver driver;
	};
	
	
	viewController Root {
		ui Label myLabel;
		ui Textfield myTextfield;
		action myAction;
	};
	
	
	restService iDriveLogService "/idrivelogservice" {
		baseUrl "http://localhost:8080/iDriveLogRESTWebServices";
		get data "/data" response:CarDataResponse;
	};	
}

Usage examples for generated code:

//Persistence and JSON Marshalling
NSLog(@"Opened database ... ");
	[db open];
	[db setShouldCacheStatements:YES];

	[db beginTransaction];
	
	// Create and Save car
	CarDAO *carDAO = [[CarDAO alloc] initWithDBManager:db];
	NSLog(@"CarDAO initialized ...");
	Car *car = [[Car alloc] init];
	car.km = [[NSNumber alloc] initWithInt:10];
	car.name = @"BMW 7er";
	car.number = @"KA-IT 310";	
	car = [carDAO save:car];

	NSLog(@"Saved Cars! %@ with idnr: %i", car, car.idnr);

	car = [carDAO findCarByIdnr:car.idnr];
	NSLog(@"Found Car! %@ with idnr: %i", car, car.idnr);

	NSLog(@"To JSON: %@",[car asJSON]);
	NSLog(@"From JSON: %@", [[car initWithJSON:[car asJSON]] name]);
	[db commit];
	[db close];

...

// WebService usage example
- (int ) webservicecall {
	CarDataResponse *response = [IDriveLogService getData];
	
	NSLog(@"Marshalled: %@", [response asJSON]);
	return 0;
}

There is also a Google Group for iPhonical: http://groups.google.de/group/iphonical

If you have any questions about the project you can contact me under: wolfgang.frank AT arconsis.com









Hosted by Google Code