Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developing Adaptive J2ME Applications Using AspectJ Ayla Débora and Paulo Borba {add, Centro de Informática - UFPE.

Similar presentations


Presentation on theme: "Developing Adaptive J2ME Applications Using AspectJ Ayla Débora and Paulo Borba {add, Centro de Informática - UFPE."— Presentation transcript:

1 Developing Adaptive J2ME Applications Using AspectJ Ayla Débora and Paulo Borba {add, phmb}@cin.ufpe.br Centro de Informática - UFPE

2 2 Summary Introduction and Motivation  Goals  The Application  AspectJ Adaptive Concerns  Customization  Screens  Caching  Internationalization Conclusions

3 Centro de Informática - UFPE 3 Introduction and Motivation Goals:  Evaluate AspectJ as a way to provide adaptive behaviors for J2ME applications  Identify advantages and drawbacks of using AspectJ for this purpose  Develop several adaptive concerns in an existent J2ME application and identify possible patterns  Compare AspectJ solutions to pure Java solutions using Design Patterns

4 Centro de Informática - UFPE 4 Introduction Adaptability  Adaptable x Adaptive  Adaptability x Ubiquity  Why J2ME? The Application  J2ME Dictionary  Possible adaptive behaviors

5 Centro de Informática - UFPE 5 The Dictionary Application

6 Centro de Informática - UFPE 6 AspectJ Language public aspect Screens { } pointcut showingScreen(): execution (public void showScreen(byte)) ; before(): showingScreen(){ System.out.println("A screen will be shown"); } public static final byte A.REGISTRATION_SCREEN=-3; Pointcut Advice Introductio n

7 Centro de Informática - UFPE 7 Adaptive Concerns Customization Screens Caching Internationalization

8 Centro de Informática - UFPE 8 Customization Concern Configuring the adaptation Comparing with design patterns Reusability Comparing with a pure Java implementation

9 Centro de Informática - UFPE 9 Customization Concern pointcut MIDletStart(MIDlet midlet):execution(void startApp())&&target(midlet); before(MIDlet midlet): MIDletStart(midlet){ adaptBefore(midlet); } void around (MIDlet midlet) : MIDletStart(midlet){ boolean shouldProceed = adaptAround(midlet); if (shouldProceed) proceed(midlet); } after(MIDlet midlet): MIDletStart(midlet){ adaptAfter(midlet); }

10 Centro de Informática - UFPE 10 Screen Concern Using Introduction Changing screens

11 Centro de Informática - UFPE 11 Caching Concern Avoids server connections Transparency

12 Centro de Informática - UFPE 12 Internationalization Concern The need for refactoring The use of auxiliary classes Interference between aspects

13 Centro de Informática - UFPE 13 Internationalization Concern pointcut internationalizing(Object key): execution(public static String DictionaryConstants.getStringValue(Object))&&args(key); String around(Object key): internationalizing(key){ return internationalization.getStringValue(key); } pointcut internationalizingNewScreens (Internationalization in): initialization(public Internationalization.new()) && target(in);

14 Centro de Informática - UFPE 14 Conclusions AspectJ and the implementation of adaptive concerns Pure OO solutions generally require more changes The use of J2ME and the identification of join points The use of auxiliary classes The necessity of refactoring

15 Centro de Informática - UFPE 15 Conclusions Interference between aspects Reusing aspects Dynamic adaptations Problems in J2ME while using AspectJ Applicability for other platforms

16 Developing Adaptive J2ME Applications Using AspectJ Ayla Débora and Paulo Borba {add, phmb}@cin.ufpe.br Centro de Informática - UFPE


Download ppt "Developing Adaptive J2ME Applications Using AspectJ Ayla Débora and Paulo Borba {add, Centro de Informática - UFPE."

Similar presentations


Ads by Google