This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://developers.google.com/admob/android/rewarded-video | |
https://developers.google.com/admob/android/quick-start | |
https://developers.google.com/admob/android/interstitial | |
https://developers.google.com/admob/android/test-ads |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void NetworkCall() { | |
RequestQueue queue; | |
StringRequest stringRequest; | |
queue = Volley.newRequestQueue(getApplicationContext(),new HurlStack(null, createSslSocketFactory())); | |
stringRequest = new StringRequest(Request.Method.POST, "https://www.thehellofood.com/restaurantapi/getFoodItems", new Response.Listener<String>() { | |
@Override | |
public void onResponse(String response) { | |
try { | |
Log.e("response", response); | |
} catch (Exception e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> No SQL (Non-Relational, full of documents) | |
-> Database - Database, Table - Collection, Tuple - Document, column - field, table join - document embed | |
-> unique id for every object | |
-> id will be 12 byte hex, 4 = timestamp, 3 = machine id, 2 = process id of mongo server, 3 = incremental value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> HTTP request are handled by controller. | |
-> @RestController over class | |
-> @RequestMapping("/path", METHOD=GET/POST....) over method | |
-> @RequestParam(value="name", defaultValue="Some Default Values") : these are query string params in url/ by default its set to required = false | |
-> java.util.concurrent.atomic.AtmoicLong is counter which returns specified Rest Object | |
-> Now converting object to JSON by MappingJackson2HttpConverter which is inside spring's Jackson2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-> light weight framework used to build any type of java apps | |
-> its non-invasive : does not force a programmer to extend any predefined class (like struts) | |
-> features : | |
-> simplicity (non-invasive) | |
-> testability (no need server/container) | |
-> lightly coupling | |
-> modules in spring 1.x : | |
-> core module | |
-> context module (J2EE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Classical inheritance : | |
Message delegation to another object if one object is not respond to message. | |
-> find abstraction and create abstract class. | |
-> Unresponsed messages are automatically delegated(forwarded) to its super class and so on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Duck Typing : | |
-> Abstract class / interface | |
-> To make code to be easy to change | |
-> increases flexibitlity | |
Statically Typing VS Dynamically Typing | |
Meta Programming : Writing code that writes code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Interface : method inside class which should be communicate with other objects with clear message pattern. | |
Ex : Kitchen | |
-> serve() is necessary but cookingManner() is not necessary. | |
-> Make them appropriate private or public interfaces | |
Use UML, Sequence diagram | |
Ask for what not for how | |
Reduce Law of demeter(Message chaining) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class : Doing possible smallest thing | |
Change : | |
-> no side effects | |
-> small change in requirement require small change in code | |
-> existing code should be easy to reuse | |
-> add code that in itself must be easy to change further | |
TRUE princliple | |
High cohesion : High single ersposibility | |
Depend on behaviour not on data. | |
Hide Data Structures(cell[0]: rim, cell[1]: tire) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recognize Dependency : | |
-> A class has another class | |
-> calls method in another class | |
-> Args that message(method) requires. Gear knows Wheel.new | |
requires rim and tire as well as order of Args. | |
More coupling -> More dependency | |
Tightly coupled two objects act as single entity | |
Avoid message chaining on different objects | |
If you cannot remove dependency from class just isolate them. |
NewerOlder