Thursday, April 15, 2004

Re: AOP (again)

I was sort of confused because what they mention was exactly what attributes are all about - injection of code at runtime, without messing with source code. Keeping a clean separation. So I was wondering what the difference was. Have you figured it out?

in attributes the attribute is added within the src. this is then used by the vm. in aop, the rules for the aspect are added in seperate files. so there is just no mixing of aop code and general source. in aspectj, aop code is inserted using the aop compiler. also regular expression style methods can be used to include aop code within a group of methods. to run the code a jar has to be included in the java command. read this article from developerworks to get an example to get the difference. better still see if there is any aop implementation in .net. there are some present for c++. also aop in java was present pre-inclusion of metadata. so i am not sure how this will affect the aop implementations.


But the injecting of code (stuff that apparently aspectJ does), that I don't understand. How do they "hook" into the runtime

the definitions of the aspectj attributes must be defined in the runtime jar file needed to be included. i must specify, that i have not yet tried aop, just read a bit on the topic. why i mentioned aspectj attributes, is that i get the feeling that aop implementations work like attributes, in the sense of including extra metadata. but there is a very huge difference which should be clear after reading an example. actually since i have never worked with attributes either is it possible to create aop like apps using attributes? consider a normal app-wide logging example.


Being a Linux guy, I'm surprised you asked this question

i guess i've given this false impression that i want everything to be open source. i really like linux and the open apps out there are really amazing. but i am not sure if i would want all my code to be gpl. definitely would want to contribute to some great open app, but will i give my killer app (if there ever will be one) under gpl i am not sure. i am not very sure of the revenue model. i know it is a bit of a hypocrisy but seriously never considered everything as open/free. maybe allowing others to see your source is ok, but others selling your stuff and calling it their own is not so cool. but who knows. do you guys ever think of contributing to an open app? especially hrishi?

also a very interesting blog by james gosling, the creator of java. he wrote on the recent microsoft-sun settlement.

No comments: