Skip to main content

Posts

Showing posts from March, 2020

WCF walk through

    Finally, got example that intriguing~     When I create client/server between Linux servers, it was not so complected... Opened a port, bind address, and then listen. Or prepared information that server were listening, and retrieved the result back. Under current Windows framework, so much information required. And how come I never successfully built startup projects provided by docs.Microsoft ....?    Many environment related issues happened when I tried to complete this WCF project. At the end, its so pleasant~~~ Source:  Docs.microsoft.com:  Tutorial: Get started with Windows Communication Foundation applications I would say this example was designed carefully. The instructions is set to be clear and simple. Naming convention may make attributes ambiguous, and the tutorial designer carefully make minor differences. I encounter many issues and finally decided not to change a word in code, making it easier to distinguish whether it was loss-thread on naming  o

New adaptation

For COVID-19 impact, governments’ subsidies are only for temporary relief. We need to innovate new sub programmes to keep our society moving. Since gathering activity should disappear, we need new ways to make it possible in virtual, and shift the benefits to real. Focus on location instead of on functionality to support real communities. Those innovations won’t replace our original business model when the world survives normal, but can live together as subservices with the mainstream. And take heavy duty during emergency situations.

VC# and chart/image viewer

    Walk through code related to charts, browser and image viewer.       It's a good thing to know how others deal various object in different way, though everything is simple on textbook. But, still, some doubts raised since the outcome is not ideal. For example, how could I create a modern browser if the version VC visual design provided is not supported by most website.....? I have to break into main loop and find out where objects are initialized, instead of waiting for system dispatched event, right? or find some way to breach the main flow...? Probably this is viable solution, but a little ugly.....    Most functionality could be done by VC UI, even the author mildly expressed that coding is almost neglectable.... As what I mentioned on last post, this is a book for VC, not for C#..... I will still complete it. At least there are examples showing me how functionality are performed. And hopefully this could be break into raw functions without assistance of visual desi

VC with MSSQL

    Walk through of VC with MSSQL. Current progress is 60%. The topic I may spend more time could be charts related.     Gradually, I got some feeling that, generally, people like system design. As a gamer, I like unlimited imagination. I may pursuit everything but common and regular. But for many people, they love things familiar. I'm no stranger to database manipulation and data expression. But people like system design, plus fast. Customization always takes time, and not acquainted, maybe not convenient....     Stepping into different world is always interesting.     2 code sections are included on this page. I thought meaningful, but still boring. I should find sometime to design interesting exercises, and also practice on LINQ.     But maybe I'm in a hurry. Azure pop into my mind rather often.When working on MSSQL exercise, I tried to find remote MSSQL host, free. Remote connection is more practical than local database file. I can hardly find any, unless MS A

VC menu exercise

    A VC exercise on menu and dialog box for loading/saving.     Actually... I'm not looking for formal guides to use visual studio... Sure thing is I need to know the detailed difference between C++ and C#. I also programming in Java, and once in Objective-C, memory address manipulation is special to C++, and also dangerous, so newer languages prevent memory issues and cover them with system background works.     Saying that knowing C++ well is also accountable for C#, but I still can't say confidently that I'm also good at C#. Things are almost the same that my IT career is almost entirely bind with internet, remote service, virtual machine simulator, cloud development, patching services, etc. before they gained modern names. But I can't say I knew Azure, AWS, SaaS, PaaS, REST api, cloud, git, etc.     I need to prove it with my codes. I don't complaint. At least, nowadays, it's possible. And studying is kind of my recreations.     This is an exer

MongoDB_02/2

Modification     Make changes on existing data. MongoDB doesn't restrict data stored in the same format. For convenience, in insert functions I kept data format the same. Fixed structure make query easy. Otherwise, for example, query strings in key "breath" is difficult. "breath" contains nested object. The key names under breath are barely the same.      With update $set and $unset, I can completely change the structure of existing records. Update $set  Set values on qualified records. $set object can contain more than one data set. At this example, I changed style from Array to String.  added new object into key-breath, expanded its branches.  added another branch-song at record root.  After update, this record owned a structure different from others. Update $unset Unset specific keys. Everything under this key would be removed. $unset object can contain multiple keys, set value to 0 to remove data set. Here I removed key-style

MongoDB_01

    After some practice on ReactJS, moved back to NodeJS. Interactive design is pale if it can only play alone. Quite often, ReactJS, NodeJS are written together with SQL or nonDB (NoSQL Database) on job description. MongoDB is a famous nonDB.     I'm using external MongoDB on  https://account.mongodb.com/account/login . Topic related to npm installation, please refer to  https://www.w3schools.com/nodejs/nodejs_mongodb.asp  My .js codes connect to MongoDB via URI string. Confidential information is encapsulated in a class object as a required file.     So, here we go! My exercises follow w3schools's tutorial, but designed in much simple way. To me, "simple" doesn't only mean "short". Clean slate also plays an important role. I may use embed function as few as possible. Create Connection  The MangoClient.connect() API is different from what is on w3school's tutorial. And when I did research, it take me a while to reach the current API docum

gamer's interview

This project simulates a gamer's interview. Based on NodeJS+ ReactJS The setting is interviewing a gamer/journalist what's his/her plan of March 2020? The gamer answers his/her game list in plan, how many reviews on demand and how many hours expected. Games selected for review take 5 hours for each, while others take one. This project is designed to practice render html, jsx, component, props introduced in  https://www.w3schools.com/REACT/default.asp . Also fixed other issues to make it work. When trying to modualize objects and tools, my design developed to separate views and processes. And it is quite similar to the initialized structure NodeJS+ReactJS provided. Furthermore, since include local module files are banned by browsers, use NodeJS service seems to be the best option. view file main process object tool

No pain no gain.

Local RestJS didn't go much further after I tried to modualize OO design; browser blocks local request: "Cross origin requests are only supported for protocol schemes: http, data, chrome" CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome- extension, https. Then I tried to launch NodeJS service to solve this problem, NodeJS treated all local included files as server main page. Maybe I can tried to use URL requests to mimic the file structure of a general server, but, under asynchronous structure, NodeJS may not process loading files in the same order of usage. Furthermore, when I implemented OO design, it is about the same structure tutorial provided: noteJS, html frame(public/html), main process (src/index.js), and classes(src/module files) Alright..... I surrender. Move back to NodeJS-ReactJS single page app.

First try on embed GitHub

It is not a bad thing to learn some more closely related topics together. But as a beginner(am I?), keeping things simple and clear is important. I searched around tutorials. It seems that almost all tutorials bind NodeJS service firmly as ReactJS's environment. BUT............. .js is supposed to be a client side tool, right? Node is different. Node is an interpreter with post-fix .exe, though it processes JavaScript code, accepts commands in run-time and executes asynchronously. I looked for someway to get rid of npm app's tedious repository. This sample seems to be a good start. Let's see how far I can go. (Probably would stop at using database. At least, I can keep my directory clean before then.) I knew nodejs service is convenient and powerful, comparing to MS Server or Apache . But why should I succumb to something I don't need for now, and let it hinder my way? Just keep it simple.