maciaszczykm / qubic Goto Github PK
View Code? Open in Web Editor NEWObject-relational mapping framework
Object-relational mapping framework
If database structure contains loop it is possible for application to have one too. It cannot happen.
Implement conditional search, at the moment all object from the table are loaded.
Instead of compiling project to .dll file, create Qubic.pri include. Create Qubic.h so user can include only one header to use whole Qubic functionallity. Add also automatic properties and libraries copy to build folder.
To improve implementation from #20 issue, tables could be recognized by their foreign complex keys.
Before data will be stored in database or read from it, it should be validated. All tables should be checked with code, methods should be available, columns like ID should be available etc.
Operations on database may be executed in different thread.
Add object serialization to XML or CSV.
Most important part of project.
Logger should inform which method is currently being executed.
Object data is read from getters. They are recognized by name pattern at the moment, for example method getName() will be mapped to NAME column in database. The target is to add macro, which will say if method should be mapped or not. Useful link:
Qt meta types should be registered, constructors are good place to do it.
User should be able to configure connection and other stuff from configuration file or from his application code.
Code should be refactored:
Properties should use sigleton pattern, to avoid loading them from file more than one time.
All of tables should have their own primary key.
Log files are splitted. One program execution should have one log file, no more than this.
It should be able to access database via queries too, not only by CRUD interface.
Currently user can use CRUD operations in his code, but there is also possibility to synchronize objects automatically. Should mapping be invokable only by user or automatically too?
Frequently used objects could be stored in cache memory to improve performance.
Add translation of messages. More information about it can be found there:
http://qt-project.org/doc/qt-4.8/internationalization.html#produce-translations
New interface needs to be created. Objects synchronized with database should be stored in map or structure like it.
To load objects from database, there is a need to construct objects in Qt using reflection. To declare meta type Q_DECLARE_METATYPE macro can be used. But how about registering classes? Following code snippet should be somehow used:
qRegisterMetaType<Employee>("Employee");
More informations can be found there:
http://blog.debao.me/2013/06/qt-macro-q-declare-metatype/
http://www.qtcentre.org/threads/22126-Instantiate-objects-only-having-their-class-name
http://stackoverflow.com/questions/19503583/qt-meta-system-call-constructor-with-parameters
It is needed to handle with multiple types of relations (1:1, 1:N and N:N). To do it, classes will store references to objects. To store object, we need to store (if it is not already stored) its content.
If we have two tables in database with 1:N relation, for example car and owner and car has info about his owner. In class car there should be method getAllOwners() or something like it to get all owners. It should be implemented also in N:N relation.
Classes should be spillted into subdirectories (core, utilities, test etc.). Way of doing it can be found there:
http://stackoverflow.com/questions/1176666/how-to-create-a-subdirectory-for-a-project-qtcreator
It is needed to map Qt types to database types. Now all works based on QString type.
Currently only MySQL database is supported. It should change.
To achieve it use shared pointers or these from Qt.
Operations on database need to be used with sessions and transactions.
Things to do:
Thesis and project documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.