Your SlideShare is downloading. ×
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Training: Day Three - Persistence
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Training: Day Three - Persistence

147

Published on

This is the third in our four part training sessions introducing FenixEdu development for new collaborators. …

This is the third in our four part training sessions introducing FenixEdu development for new collaborators.

In this third session, we introduce our persistence technology and database engine as well how to commit database changes to version control.

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
147
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Persistence SQL, Domain & Fenix Framework
  • 2. How to change your grades SQL, Domain & Fenix Framework
  • 3. Application Container (Tomcat, Jetty) JSP renderers Faces Jersey (REST API) Domain Model Struts Fenix Framework (STM) MySQL
  • 4. Fenix Framework ● Software Transactional Machine ● Developed in part by our Team ● Available at: ○ https://github.com/fenix-framework/fenix-framework
  • 5. Fenix Framework DML class PendingRequest { relation PendingRequestRootDomainObject { DateTime generationDate; RootDomainObject playsRole rootDomainObject; String url; PendingRequest playsRole pendingRequest { Boolean post; multiplicity *; String buildVersion; } } }
  • 6. Fenix Framework DML enum net.sourceforge.fenixedu.util.WeekDay as WeekDay; valueType java.math.BigDecimal as BigDecimal { externalizeWith { String toString(); } }
  • 7. Fenix Framework DML RootDomain Object 1 * Entity DomainObject
  • 8. Fenix Framework DML class Degree extends AcademicProgram { Double ectsCredits; String nome (REQUIRED); }
  • 9. Fenix Framework DML @ConsistencyPredicate private boolean checkRequiredSlots() { ConsistencyChecks.checkRequired(this, "nome", getNome()); return true; }
  • 10. Fenix Framework Transactions ● Use @Atomic ● Can be READ, WRITE, SPECULATIVE_READ ● DO NOT USE IN ACTIONS!
  • 11. Fenix Framework DML ● /src/main/dml/domain_model.dml ● 1370 Entities, 1802 Relations, 54 Value Types & 200 Enums
  • 12. Fenix Framework Fenix Domain Browser ● Available at: ○ https://fenix-ashes.ist.utl.pt/fdb/ ● Source code at: ○ https://github.com/nurv/Fenix-Domain-Browser ● Demo:
  • 13. Fenix Framework Changes ● ● ● ● ● ● Edit domain_model.dml. Run mvn clean test -PSQLUpdateGenerator Edit /etc/database_operations/updates.sql Rename updates.sql Edit /etc/database_operations/run Run /etc/database_operations/run
  • 14. ⚠ BE CAREFUL!
  • 15. Fenix Framework Dumps ● Goto: ○ https://fenix-ashes.ist.utl.pt/jenkins/ ● Demo
  • 16. MySQL ● You are going to run the database in a remote server. ● How to connect: ○ ssh -A -fNg -L <localport>:localhost:3306 mysqluser@fenix64bit.ist.utl.pt ○ mysql -h localhost -u<istid> --protocol=TCP -P <localport> -p<dbpass> <istid>_fenix -A
  • 17. MySQL ● Edit fenix-framework.properties: ○ dbAlias=//localhost:<localport>/<istid>_fenix? useUnicode=true&characterEncoding=utf8&clobCha racterEncoding=utf8&zeroDateTimeBehavior=conve rtToNull ○ dbUsername=<istid> ○ dbPassword=<dbpass>
  • 18. So, how do you change your marks?

×