Objective-PHP & Moka

13 views
Skip to first unread message

Stephen Ierodiaconou

unread,
Mar 2, 2010, 4:25:38 AM3/2/10
to objec...@googlegroups.com
Hey everyone,

Just wanted to mention my latest little project cause I think it will have interest to some Cappuccino developers,
at least ones who are in the Objective-J learning process. Hope you all don't mind.

http://stevegeek.github.com/moka/

Ive created a port of the Objective-C syntax/runtime/object model to PHP, similar to Objective-J/Javascript.
While its obviously a server side environment rather than a client side one people who come from a PHP
background might find it useful to practice with Objective-PHP to enhance their Objective-X skills since
they can mix and match with PHP as much as they feel comfortable with.

The language supports a lot of the Objective-C language and runtime features (protocols, categories etc),
and those that are still missing are planned.

I also intend to make archiving (encoding/decoding) between Objective-J and Objective-PHP objects
transparent so that client side code could be Objective-J/Cappuccino and server side Objective-PHP/Moka ...
and this could lead people further into say Objective-J on the server side.

At the moment Im also in the process of creating alot of documentation, in an attempt to describe the inner
workings to give a better and deeper understanding of the workings of Objective-X languages.

Anyway, its an ongoing process and if anyone is interested please feel free to contribute.

A discussion group is here:
http://groups.google.com/group/objective-php

---
Here is a little snippet:

@import <Foundation/MKObject.op>
@import <Foundation/MKString.op>
@import <Foundation/MKDictionary.op>

@protocol IHasMethods
- (bool)aMethod;
- (bool)anotherMethod:name;
@end

@implementation TestClass : MKObject <IHasMethods>
{
MKDictionary $test @accessors;
}

- (id)init
{
if ($self = [super init])
[$self setTest: [MKDictionary dictionary]];
return $self;
}

- (bool)aMethod
{
[$test setObject:[[MKString alloc] initWithString:"Hello Cappuccino"] forKey:"first"];
}

- (bool)anotherMethod:name
{
[$test setObject:[[MKString alloc] initWithString:"Hello ".$name] forKey:"second"];
}
@end

$obj = [[TestClass alloc] init];

---
Steve


Dhi Aurrahman

unread,
Mar 2, 2010, 5:09:53 AM3/2/10
to objec...@googlegroups.com
Wow -- this is great -- I think "we" can start by providing examples
in RESTful-way, to attract cappuccino users to "hands-on" directly;
since this is (IMHO) the "best-interaction-model" of cappuccino as
webapp to interact with the server.

Two thumbs up for you Steve!

Best,

Dio

> --
> You received this message because you are subscribed to the Google Groups
> "Cappuccino & Objective-J" group.
> To post to this group, send email to objec...@googlegroups.com.
> To unsubscribe from this group, send email to
> objectivej+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/objectivej?hl=en.
>
>

Stephen Ierodiaconou

unread,
Mar 2, 2010, 2:29:29 PM3/2/10
to objec...@googlegroups.com
Yeah, sounds good :)
If anyone is interested in proposing a simple webapp with objj/capp client side and
an objphp server side, a tutorial can be created that we walk through the creation of the app , client and server, hopefully
covering objective-X principles and some of cocoa fundamentals.(we dont need to cover all the details we can point to good
objective-c tuts) I would be happy to work on this but probably the Capp side should be created by you guys, the more
experienced developers.

It would also be a good excuse to get on the case of integrating capp and moka so objects can easily be passed back n forth.

steve

(ps ill be away all next week but ill catch up with any further discussion on this after, and for any Obj-PHP discussion there is the Google group :)

Kyle Dawkins

unread,
Mar 2, 2010, 11:54:21 PM3/2/10
to Cappuccino & Objective-J
Hey Stephen (& list)

This is brilliant! I was so stoked when I first heard about
ObjectiveJ, because I had the same idea about 10 years ago to make
ObjectiveJava but never got around to it. And Java seems to have died
off significantly since then. ObjectivePHP is a great great idea.

Also, if anyone's interested, I did the same thing with Perl a while
back, and it's still floating around on CPAN:
http://search.cpan.org/~kyled/ObjectivePerl-0.04/ObjectivePerl.pm

and wrote an article about it for DDJ:
http://www.drdobbs.com/184416144

My motivation was that I was a WebObjects programmer who switched jobs
and was working in Perl; I also made a very-heavily-based-on-
WebObjects-and-EOF web framework that I will be open sourcing in a few
months, if there's any interest.

And I recently saw that a dude made Objective Lua too:
http://olua.sourceforge.net/

Great to see people "getting" the Smalltalk/Obj-C way of doing things!

Cheers

Kyle

Francisco Tolmasky

unread,
Mar 3, 2010, 1:48:44 AM3/3/10
to Cappuccino & Objective-J
This is very cool, after we ship 0.8 I definitely want to give this a
try

On Mar 2, 1:25 am, Stephen Ierodiaconou <steveg...@gmail.com> wrote:

Ignacio Cases

unread,
Mar 3, 2010, 4:15:47 AM3/3/10
to objec...@googlegroups.com
This is really nice, and a very good movement. And Kyle's project is also impressive. Congrats to both Stephen and Kyle!

-Ignacio

Gerard Iglesias

unread,
Mar 3, 2010, 4:02:10 PM3/3/10
to objec...@googlegroups.com, Cappuccino & Objective-J
Funny thing

Long Time ago when NeXT took Apple over, The macintosh développer
community using Pascal was not happy to see The 'C' world winning, I
though that an Objective-Pascal would have been a solution to The
announced death of The Pascal language :)

Gérard

Envoyé de mon iPhone

Michael Dingler

unread,
Mar 3, 2010, 4:51:43 PM3/3/10
to objec...@googlegroups.com
Long Time ago when NeXT took Apple over, The macintosh développer community using Pascal was not happy to see The 'C' world winning, I though that an Objective-Pascal would have been a solution to The announced death of The Pascal language :)

Well, there's Objective Modula-2[1], although it still seems to be in the design stage, with some major internal changes.

Stephen Ierodiaconou

unread,
Mar 4, 2010, 3:12:18 AM3/4/10
to Cappuccino & Objective-J
Hey Kyle,
its awesome to see ObjectivePerl! It comforting to think soon no
matter what substrate you are required to program on, you can use
Objective-C syntax and logic :)

Also its cool to see you have documented how it all works, when I get
a moment ill get through and have a read.

How come you dont actively develop a ObjectivePerl port of Cocoa?

Kyle Dawkins

unread,
Mar 4, 2010, 1:44:01 PM3/4/10
to Cappuccino & Objective-J
Hey Stephen

Good question! I exclusively use OSX, and in OSX you can use what's
called the PerlObjcBridge to access Foundation so there's support
built-in to ObjectivePerl for it. ObjectivePerl also supports (or
supported... I haven't used it in a while) CamelBones, which is a
framework that allows you to write OSX apps completely in Perl too.

I don't ever use any other platforms so I don't know what it would
take to get it to work with something like GnuStep.

I made ObjectivePerl about 6 years ago and honestly haven't looked at
it much since then... I'm not sure why. But I think the traffic on
this group has inspired me to dust it off and use it again. When I
first made it, I used it fairly extensively for projects, and it was
really nice and made code so much more readable.

I did spend a lot more time working on my perl "pseudo-port" of
WebObjects/EOF, because it was part of my job. My employer has agreed
to let me open source it, because we're phasing it out in favour of a
Python-based platform (urrggrgg, not my choice at all) so when that
happens in the next few months, I'll be putting that out. It's got
lots of good stuff in it, but is also a bit hairy around the edges
since I wrote it for internal use only. It's been running our website
http://www.idealist.org and handling 1m+ users for almost 10 years
without any major problems. If there's any interest in it, I could
grant access to the repository.

Cheers!

Kyle

stephen white

unread,
Mar 5, 2010, 12:08:14 AM3/5/10
to objec...@googlegroups.com
On 05/03/2010, at 5:14 AM, Kyle Dawkins wrote:
> built-in to ObjectivePerl for it. ObjectivePerl also supports (or


There's also an Objective-Lisp, called Nu at http://programming.nu/ ...

--
st...@adam.com.au


Reply all
Reply to author
Forward
0 new messages