Skip to main content

Posts

Backend Developer & Development [ Part 2 ]

Incoming Requests In incoming requests, you must know about HTTP verb / method, queries, params, headers, body and flows.  For HTTP verb / method, there's are many but i only introduce most common one. All of the method have their own usage like GET           -  For client GET data from server-side POST         -  For client POST data at body to server-side for creation or other requests that used post body. PUT            - For client replace specific data with body given. PATCH       - For client update partial data with body given. DELETE    - For client delete specific data from server-side. For queries, params, headers and body, they like a message that from client. 4 of them will receive on different places. Queries  - Can found at behind of the URL. Look like  ?value=abc . Params   - Defined by backend deve...

Async / Await vs Promises

## Node.JS In node.js, asynchronous operation able to done by two ways. They are async/await codeblock or promises. What different between them? ### Promises In promises, some of them call it `callback hell` because of the syntax keep repeating callback like and until the end of the async operation. Here come with an example. ```js samplePromise: () => { var promise = new Promise((resolve, reject) => { try { // async codeblock resolve(result); } catch (e) { reject(e); } }); promise.then( (result) => { // result is returning and async operation run complete. }, (rejected) => { // rejected something wrong when running async operation } ).catch( (error) => { // unhandled error occurs when running async opeartion } ); } ``` With this example, you able see that promise code block is quite long when running an async operation, try to think what if more complex async operation required to run, like you need to get data fr...

Flutter codebase sharing

# Clone For master branch come with example, you can clone and run `flutter doctor && flutter run` ``` git clone --single-branch --branch master https://github.com/Oskang09/Flutter-CB2019.git ``` For codebase branch just empty codebase, but setup done you can just start your development. ``` git clone --single-branch --branch codebase https://github.com/Oskang09/Flutter-CB2019.git ``` # Plugins * Dart as "Programming Language" * Flutter as "SDK" * Redux as "State Management" * Fluro as "Navigator Router" # pubspec.yaml ```yaml name: flutter_codebase description: A new Flutter project. version: 1.0.0+1 environment: sdk: ">=2.0.0-dev.68.0 (); Router router = Router(); routers.forEach( (route) { router.define( route.routePath, handler: Handler( handlerFunc: (context, params) => route.widget(params) ), transitionType: route.transitionType ...

Global Game Jam @ 2019 January 25 - 27 with Friends

A 3 day 2 night game development event, Global game jam and held at KDU Glenmarie. With a team of 3 people, we haven't done our game until the end but we learned much on the development. Such as modeling, coding, designing, editing using software like photoshop, magicavoxel, unity. Due to inexperienced we doesn't allocate work properly and lastly only done modeling & some mechanic part like health, damage, team check. But still many mechanic haven't done like taming, spawning and more. Sadly doesn't meet our expectation but really enjoy when developing in this event, KDU's student also very friendly to we. Thanks for the all participate for sharing in this event. Event & Game Information This global game jam event title is about "What is home means to you". So we have come with idea bring characters ( player ) back to home, or with defensive feature also dialog chat. Lastly we decide with Realtime-Strategy Defensive Game ( RTS Defensive ) abo...

Backend Developer & Development [ Part 1 ]

Backend developer is a develop who maintain the work users /  clients can't see such as processing transaction, data structure, data transfer. These works would contains in a API server and API server contains many endpoint that can call by anyone but only success when fulfill endpoint requirements so it is secured. API Server also know as REST API ( Representational State Transfer ). It's processing like client request to server & after server process return response to client. API Server is develop by backend developer and this api server can be many type and different language, different framework such as Ruby on Rails ( RoR ) using Ruby Python PHP ( Laravel & Yii2 ) Java ( Spring ) C# ( ASP.NET & NancyFX ) Node.JS ( ExpressJS, SailsJS, HapiJS, NestJS, FeatherJS ) Different framework have their own advantages and can be used on different projects based on their features and usage. In the development not only choosing frameworks also need to ch...

Local Development | LAN [ Local Area Network ]

Before an application, website, backend server, frontend app or any application required to integrate with another platform, how you work with your friends? Put all in one computer for testing?  Upload to a free hosting for testing like Heroku ? If your team able to work in same place, i would suggest hosted own local network for testing at least faster then using other free platform like Heroku. As of improvement of technology, nowadays network interface card ( NIC ) would have a feature about HostedNetwork. You can host your local area network ( LAN ) for your friends and they can access your works and testing at their own computer and fix would faster the development. In Windows You can use command prompt and type "netsh wlan show drivers" and check is "Hosted network supported : ". If supported you can create your local area network by using command "netsh wlan set hostednetwork mode= allow ssid= YourAP key= YourPW ". YourAP  = Acc...

Object & Container Object

Object / Class What is Object? Object can be people, can be animal, can be anything. Object only store his own data, attributes and property like house has price, size and animal has age and gender.  Object also store his own function or method like animal can eat(); and people can walk();. Try imagine an object is a people, what should it have and what should it don't have? Let's take this example. public class People { private: String name; int age; int hungry; public: void grow() { this->age += 1; } void eat() { hungry = false; } } People can eat, people will grow up so this is true but you try imagine a people can fly(); ? What other programmer see when want to use ur code? "WTF, WTF is this? Oh my godness." so just store whatever the object need, have is enough. When some attribute is too much and enable to split to another object,...