1 / 43

ASpectworkbench

Sponsored by:. Project Members: Sayali Kumbhar Priti Kothari Aalap Doshi Ananta Agrawal. Internal Guide: Mrs.B.S.Tiple External Guide: Ms.Shubhangi Bhagwat. ASpectworkbench. Introduction to AspectWorkbench Background

noble-kidd
Download Presentation

ASpectworkbench

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sponsored by: Project Members: Sayali Kumbhar Priti Kothari Aalap Doshi Ananta Agrawal Internal Guide: Mrs.B.S.Tiple External Guide: Ms.Shubhangi Bhagwat ASpectworkbench

  2. Introduction to AspectWorkbench • Background • AspectWorkBench – A Closer Look… • Design Overview • Process • Software Engineering • Future Enhancements overview

  3. A general scenario…. Oh…… its getting too messed up….!! Let me try AOP…. Account Credit() Debit() . . Sr. Developer “Sir, I am ready with the code!!” “Sir……!!!” LoanAccount LoanTrans() EMIDetails() . . Logging “Ok. But where is the logging ?!” “Log the ID, timestamp, balance details…..blah blah blah…” SavingsAccount InterestDetails() BalanceDetails() . . Jr. Developer

  4. privileged aspect LogTransactions { pointcutregister_savings(): call(SavingsAccount.new(int)); before():(call(SavingsAccount.new(int))) { Object[] args=thisJoinPoint.getArgs(); System.out.println("User Registered for Savings Account with ID:"+args[0]); } pointcutregister_loan(): call(LoanAccount.new(int)); before():(call(LoanAccount.new(int))) { Object[] args=thisJoinPoint.getArgs(); System.out.println("User Registered for Loan Account with ID:"+args[0]); } pointcutlog_credit(): execution(void Account.credit(float)); before( Account acc):(execution(void Account.credit(float))) && this(acc) { Object[] args=thisJoinPoint.getArgs(); System.out.println("[Request Sent] for credit of amount "+args[0]+" from aaccount with ID:"+acc._accountNumber); } Object around(Account acc):(execution(void Account.credit(float)))&& this(acc) { Object[] args=thisJoinPoint.getArgs(); Object ob= new Object(); System.out.println("[Request Successful] for credit of amount"+args[0]+" from account with ID:"+acc._accountNumber); ob=proceed(acc); Systemout.println("....Current balance:"+acc.getBalance()+"\n"); return ob; } Uh Oh!!!! Too tedious…!!!!! Jr. Developer

  5. A Solution… SavingsAccount InterestDetails() BalanceDetails() . . Logging Bussiness Application Core Bussiness Logic + Logging + Policy Enforcement + Other horizontal components Policy Enforcement LoanAccount LoanTrans() EMIDetails() . . Monitoring Account Credit() Debit() . . . . . . Many more…. AspectWorkbench

  6. Flashback…….

  7. Program Object 1 data Object 4 data Object 2 data Object 3 data Object oriented programming Easier to read & write Better evolvability Better maintainability Better reusability • Encapsulation • Polymorphism • Inheritance Object-oriented Programming

  8. Concerns Concern: “Something the developer needs to care about” (e.g. functionality, requirement,..) Separation of concerns: Handle each concern separately Crosscutting Concerns : Are Concerns cutting across multiple elements in the system.

  9. Program Object 1 data Object 4 data Object 2 data Object 3 data Modularization in oop Typical general examples: synchronization, error handling, timing constraints, user-interface, ...

  10. Scattering and tangling Code Scattering : code for one concern is spread over many modules Code Tangling : code in one module addresses multiple concerns Scattering and tangling tend to appear together

  11. Cost of scattered and tangled code • Redundant code • same or similar fragment of code in many places • Difficult to reason about • the big picture isn’t clear • Difficult to change • have to find all the code involved • be sure to change it consistently • get no help from OO tools

  12. Aspect oriented programming (aop) • AOP builds on OOP and does not replace • OOP • AOP focuses on • modularization of crosscutting • concerns • Compiler driven meshing of intersecting codes • Provides support to software architect to emphasize on separation of concerns right from design phase • Support to popular languages like Java, C++…

  13. AOP terminologies Application Aspect: is analogous to a class in OOP. Aspects define pointcuts and advices to implement crosscutting modules. Joinpoint : A join point is a point of interest where a crosscutting concern intersects the business logic Pointcut : is in essence a construct to capture join points. Advice : is executable code for a pointcut. Object 1 data Object 4 data Object 2 data Object 3 data Aspect joinpoint: ●

  14. : Helper.foo(n/3); : : Helper.foo(i+j+k); : : Helper.foo(x); : Core Code How Aop works Final Code Final Code : System.out.println("foo called"); Helper.foo(n/3); : Weave public aspect Logging { : pointcut logFoo():call(* Helper.foo(..)); before(): logFoo(){ System.out.println("foo called"); … } : } : System.out.println("foo called"); Helper.foo(i+j+k); : Aspect : System.out.println("foo called"); Helper.foo(x); :

  15. AspectWorkbench- a closer look…

  16. Allows the creation of standard crosscutting modules using the Library. What aspectworkbench does… For Team Leader For Developer • Allows the developer to create crosscutting modules without he/she having to know aspectj syntax. For Team Member For Organization • Can use the crosscutting modules prepared by the team leaders in the ‘plug and play’ fashion without having to know anything about AOP. • Clean, easily maintainable, uniform and standardized codes addressing separate concerns.

  17. Roadmap

  18. Aspectworkbenchide

  19. Design overview…

  20. Technologies… Aspectj Ruby Core of AspectWorkBench. An AOP extension to java. 1. Template creation 2. Pointcut , Advice transformation to XML. 3. Aspect Generation from XML template. Eclipse Platform XML Eclipse Plugin. GUI support. Process Handling. Schema Building XML DOM Handling

  21. sa AspectWorkBench is a plugin to Eclipse 3.x Components…

  22. New crosscutting module wizard • Allows user to create a new crosscutting module. • Extracts the required parameters for creating of crosscutting module CHALLENGES • Getting path of user workspace . • Making a composite page. • Checking the validity of aspect name.

  23. ‘outline’ view extension • Exposes intersection points • Extracts information required to create joinpoints CHALLENGES • Extending the eclipse Outline view. • Trying to arrange the options such as to prevent the user from changing his daily usage patterns. • Provides abstraction

  24. Crosscutting tree • This view shows the structure of the crosscutting modules related to the current project. CHALLENGES • XML-DOM parser. • Resource change listener.

  25. library • This component provides the user with a list of ready to use crosscutting modules. • No AOP knowledge is required for the use of Library. • Provides a facility to add to the list. CHALLENGES • Providing an abstraction. • Reusability

  26. process

  27. The R&D process…

  28. PROCESS…

  29. Software engineering…

  30. Software engineering… Activities Deliverables • High Level Planning • Technology Exploration • Conceptualization Brain Storming • Aspectj, Eclipse, Ruby Seminars • Identification of POCs • POC Projects • Reviews by Guides • Concept Document • Research reports Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 1st August to 15th September • 60pds at 6.1 person hours per day

  31. Software engineering… Activities Deliverables • Review of Scope Document, SRS • Prepare and Review Usecases • Developing Prototype • Prepare detailed Plan • Scope Document • Usecase Document • Usecase Diagram (UML) • SRS Document (IEEE Format) • Software Project Plan • Prototype • Activity Diagram (UML) Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 1st September to 15th November • 1st January to 15th February • 60pds at 6.1 person hours per day

  32. Software engineering… Activities Deliverables • Architecture Workshop • Prepare and Review of Architecture • Architecture Document (4+1 View) Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 15th January to 15th February • 60pds at 6.1 person hours per day

  33. Software engineering… Activities Deliverables • Prepare and Review Design • Review for conformance with Requirements Specification. • Design Pattern Workshops Application Design Class Diagrams XML Schema Design Screen Design Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 1st January to 1st February • 60pds at 6.1 person hours per day

  34. Software engineering… Activities Deliverables • Coding • Ruby for Generator • Eclipse components • Prepare, Code and Review Templates • Codes • XML Files • Templates • GUI components • Help Documentation Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 1st January to… • 60pds at 6.1 person hours per day

  35. Software engineering… Activities Deliverables • Unit Testing • Integration • Testing • Black Box • White Box • Usability • Integration • Log Defects • Bug Fixing • Bug Closure • Test Cases • Test Reports • Defect Logs Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 1st February to …(Unit Testing) • 60pds at 6.1 person hours per day

  36. Software engineering… Activities Deliverables • Packaging and Creating Final executable • Deployable AspectWorkBench plugin. Timelines and Efforts • 1st June, 2005 to 31stJuly, 2005 • 60pds at 6.1 person hours per day

  37. deliverables • AspectWorkbench plug-in • HTML User Manual • Integrated Help

  38. Logging • Error Handling • Policy Enforcement • Monitoring • Maintenance • And many more… USE of Aspectworkbench in Industrial applications

  39. Future enhancements

  40. Providing support for wildcards • AspectWorkbench editor for editing advices. • Generalized plug-and-play libraries • Visualizer to show code crosscutting • Support for incremental Compiler Future enhancements

  41. Thank you…

  42. Questions…

  43. FigureElement moveBy(int, int) refresh() Point Line 2 getX()getY()setX(int)setY(int)moveBy(int, int)draw() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw() ExAMPLE for inheritance after(): call(void FigureElement+.set*(..)) || call(void FigureElement.moveBy(int, int)){ Display.update();} these methods all end withcall to: Display.update(); public class Point{ ……. public void getY(){ ……. ……. Display.update(); } ……. } Display Updating

More Related