Persistence
SQL, Domain & Fenix Framework
How to change your grades
SQL, Domain & Fenix Framework
Application Container (Tomcat, Jetty)

JSP
renderers

Faces
Jersey
(REST API)
Domain
Model

Struts

Fenix Framework
(STM)
...
Fenix Framework
● Software Transactional Machine
● Developed in part by our Team
● Available at:
○

https://github.com/fen...
Fenix Framework
DML
class PendingRequest {

relation PendingRequestRootDomainObject {

DateTime generationDate;

RootDomai...
Fenix Framework
DML
enum net.sourceforge.fenixedu.util.WeekDay as WeekDay;
valueType java.math.BigDecimal as BigDecimal {
...
Fenix Framework
DML

RootDomain
Object

1 *

Entity

DomainObject
Fenix Framework
DML
class Degree extends AcademicProgram {
Double ectsCredits;
String nome (REQUIRED);
}
Fenix Framework
DML
@ConsistencyPredicate
private boolean checkRequiredSlots() {
ConsistencyChecks.checkRequired(this, "no...
Fenix Framework
Transactions

● Use @Atomic
● Can be READ, WRITE, SPECULATIVE_READ
● DO NOT USE IN ACTIONS!
Fenix Framework
DML

● /src/main/dml/domain_model.dml
● 1370 Entities, 1802 Relations, 54 Value
Types & 200 Enums
Fenix Framework
Fenix Domain Browser

● Available at:
○

https://fenix-ashes.ist.utl.pt/fdb/

● Source code at:
○

https:/...
Fenix Framework
Changes

●
●
●
●
●
●

Edit domain_model.dml.
Run mvn clean test -PSQLUpdateGenerator
Edit /etc/database_op...
⚠
BE CAREFUL!
Fenix Framework
Dumps

● Goto:
○

https://fenix-ashes.ist.utl.pt/jenkins/

● Demo
MySQL
● You are going to run the database in a remote
server.
● How to connect:
○ ssh -A -fNg -L <localport>:localhost:330...
MySQL
● Edit fenix-framework.properties:
○ dbAlias=//localhost:<localport>/<istid>_fenix?
useUnicode=true&characterEncodin...
So, how do you change your marks?
Training: Day Three - Persistence
Upcoming SlideShare
Loading in …5
×

Training: Day Three - Persistence

205
-1

Published on

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
205
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Training: Day Three - Persistence

  1. 1. Persistence SQL, Domain & Fenix Framework
  2. 2. How to change your grades SQL, Domain & Fenix Framework
  3. 3. Application Container (Tomcat, Jetty) JSP renderers Faces Jersey (REST API) Domain Model Struts Fenix Framework (STM) MySQL
  4. 4. Fenix Framework ● Software Transactional Machine ● Developed in part by our Team ● Available at: ○ https://github.com/fenix-framework/fenix-framework
  5. 5. Fenix Framework DML class PendingRequest { relation PendingRequestRootDomainObject { DateTime generationDate; RootDomainObject playsRole rootDomainObject; String url; PendingRequest playsRole pendingRequest { Boolean post; multiplicity *; String buildVersion; } } }
  6. 6. Fenix Framework DML enum net.sourceforge.fenixedu.util.WeekDay as WeekDay; valueType java.math.BigDecimal as BigDecimal { externalizeWith { String toString(); } }
  7. 7. Fenix Framework DML RootDomain Object 1 * Entity DomainObject
  8. 8. Fenix Framework DML class Degree extends AcademicProgram { Double ectsCredits; String nome (REQUIRED); }
  9. 9. Fenix Framework DML @ConsistencyPredicate private boolean checkRequiredSlots() { ConsistencyChecks.checkRequired(this, "nome", getNome()); return true; }
  10. 10. Fenix Framework Transactions ● Use @Atomic ● Can be READ, WRITE, SPECULATIVE_READ ● DO NOT USE IN ACTIONS!
  11. 11. Fenix Framework DML ● /src/main/dml/domain_model.dml ● 1370 Entities, 1802 Relations, 54 Value Types & 200 Enums
  12. 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. 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. 14. ⚠ BE CAREFUL!
  15. 15. Fenix Framework Dumps ● Goto: ○ https://fenix-ashes.ist.utl.pt/jenkins/ ● Demo
  16. 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. 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. 18. So, how do you change your marks?
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×