-
Notifications
You must be signed in to change notification settings - Fork 10
Model Entity
landawn edited this page May 1, 2018
·
2 revisions
Model/Entity is the abstraction of real world. defining a good Model/Entity will make programming much easier, for example:
// Without Model/Entity object.
Document doc = new Document();
doc.put("gui", N.uuid());
doc.put("firstName", "jack");
doc.put("lastName", "ye");
// With Model/Entity object.
Account account = new Account().setGUI(N.uuid()).setFirstName("jack").setLastName("ye");
Here the differences are not jsut about lines of code, you have to deal with tens/hundreds of key names and the data types. Someone may think: "I'm using NoSQL. Model/Entity object is unnecessary". That's not true. Model/Entity decides how the data/logic in real world will be processed in program, which is not related to the technologies of data store. Defining a good model/entity will:
- Make reading/saving/transfering/manipulating data much easier
- Simplify the system design and implementation
- Reduce a lot of extra headaches which could be introduced by bad/no Model/Entity
- ... There is also a good example about how programming can be simplified by Model/Entity: SQLite Executor
Model/Entity is not just key/value, it's much more than the key/value structure Map/Document/ContentValues...
- How to Learn/Use the APIs correctly and efficiently
- Programming in RDBMS with Jdbc/PreparedQuery/SQLExecutor/Mapper/Dao
- JSON/XML Parser
- SQLite Executor
- SQL Executor
- SQL Builder
- SQL Mapper
- DataSet
- JdbcUtil/CSVUtil
- IOUtil
- PrimitiveList
- Profiler
- Http Client
- Web Services
- Programming in Android
- Parse/Analyze/Operate (Big) Data (on N servers in parallel)
- Code Generation
- Introduction to JDBC
- Naming Convention
- Partitioning/Distribution
- SQL/NoSQL
- Model/Entity