Best Practice In Software Development

Information about Best Practice In Software Development

Published on February 18, 2017

Author: sarccom

Source: slideshare.net

Content

1. Best Practice in software development Dipl. Inform.(FH) Jony Sugianto, M. Comp. Sc. WA:0812-13086659 Email:[email protected]

2. Agenda ● Programming language features – Dynamic typed language – Static typed language – Strong typing – Weak typing ● Design Database System – Complexity - Database model – Volume - Sharding – Traffic read/write - Replication

3. Dynamic Typing ● conceptually simpler and easier to understand than static typing. ● more flexible. ● results in more compact programs. ● faster development /# python num=5 num=”hello” #change type automatic def predict(input): ret=0 # do something return ret def bigfunction(predict, input): out=predict(input) return out

4. Static Typing ● Explicit declaration (or initialization) of variables before using ● Type checking is performed during compile-time as opposed to run-time ● One can refactor with greater confidence ● Types serve as documentation ● Run time efficiency // scala var id:Int=1 var number=2 var alamat=”jakarta” def predict(input:Int):Double={ var ret=0.0 // do something return ret } def bigfunc(predict:(Int)=>Double, input:Int)={ var out=predict(input) return out }

5. Strong Typing // scala var foo:String=”x” foo=foo+2 // error at compile time /* Python code */ # error at runtime >>> foo = "x" >>> foo = foo + 2 Traceback (most recent call last): File "<pyshell#3>", line 1, in ? foo = foo + 2 TypeError: cannot concatenate 'str' and 'int' objects >>>

6. Weak Typing // PHP code $str = 5 + "hello"; // equals 5 because "hello" is implicitly casted to 0 // PHP is weakly typed, thus is a very forgiving language.

7. Summary ● Strongly typed - many rules ● Weakly typed - few rules ● Dynamically typed - rules applied at run time ● Statically typed - rules applied at compile time

8. Programming Language Features

9. Design Database System ● Complexity - Database model ● Volume - Sharding ● Traffic read/write - Replication

10. Database Model ● Key-values Stores ● Document Databases ● Relational Databases ● Graph Databases

11. Key-Value Example

12. Key-Values: Cons ● No complex query filters ● All joins must be done in code ● No foreign key constraints ● Poor for interconnected data

13. Document Databases ● Documents are the main concept ● Documents are: -self-describing -Hierarchical tree data structures(map. List, scalar-values) { name:ade, usia:20, alamat:depok } { name:wahyu, usia:30, pekerjaan:dosen }

14. Document Databases

15. Document Databases:Pros and Cons ● Pros: - Simple model - Built in Map-reduce ? - Scalable ● Cons: - Poor for interconnected data

16. Relational Model

17. Relational Database Pros/Cons ● Pros - simple, well-establish, standard approach - maps well to data with consistent structure - has extensive join capabilities ● Cons - hard to scale - does not map well to semi-structured data - knowledge of the database structure is required to create queries

18. Graph Database

19. Graph Model

20. Key Value to Graph

21. Document to Graph

22. Relational to Graph

23. Graph Database Pros/Cons ● Pros - powerful data model - easy to query(relation as pointer to object) - map well to semi-structured data - can easily evolve schema ● Cons - hard to scale - lacks of tool and framework support - requires new art of problem solving

24. Sharding Database Shard ShardShard Aggregation ● Sharding is Splitting data across databases ● Splitted Data share nothing ● Important issues sharding key

25. Replication ● Creating and maintaining multiple copies of the same databases

26. Scalability, Complexity and Database Model Scalability Complexity Key-Values Stores Document Database Relational Database Graph Database

27. Questions?

#change presentations

Continuous Learning at Work
13. 08. 2019
0 views

Continuous Learning at Work

Related presentations


Other presentations created by sarccom

Telco Business & Technology
18. 02. 2017
0 views

Telco Business & Technology

Is your code SOLID enough?
18. 02. 2017
0 views

Is your code SOLID enough?

The Jungle of Big Data
17. 10. 2017
0 views

The Jungle of Big Data