Skip to main content

Contact


Comments

Popular posts from this blog

Express Js - එක්ස්ප්‍රස් js වලින් වැඩ ගනිමු

යළුවනේ, අද ම්ං මේ කියන්න යන්නේ තවත් JavaScript Library එකක් ගැන. ඒ Express JS. මේක Node.Js වලටම හදපු Web Framework එකක්.  Express කියන්නේ වෙබ් සහ ජංගම යෙදීම් සඳහා ශක්තිමත් විශේෂාංගයක් සපයන අවම හා නම්‍යශීලී Node.js Web Framework එකක්. ( වෙබ් යෙදුම් රාමුවක්). මේ Framework එකෙන් පරිශීලක අතුරු මුහුනතයි (User Interface) එකයි Back End එකයි එකතු කරන්න API ( Application Programming Interface ) එකක් හදාගන්න පුළුවන්. ඒ කියන්නේ අපි හදන වෙබ් ඇප්ලිකේශන් (Web Application) එකේ පරිශීලකයාට පෙනෙන UI එකයි Server එකේ තියෙන ප්‍රධානම බිස්නස් ලොජික් (Business Logic) එකයි සම්බන්ධ කරන්න පුලුවන් මේ Framework එකෙන්. Node JS : npm පාවිච්චි කරල හරිම පහසුවෙන් අපේ project එකට එකතු කරගන්න පුළුවන්. Project path එකේ console එකක් අරන් එකේ මේ code එක execute කරන්න මුළින්ම. මේකෙන් project එකට අවශ්‍ය Express node module එක ඔයාගේ project root එකේ node-modules එකට එකතු කරනවා. $ npm install express --save දැන් ඔයගේ ප්‍රොජෙක්ට් එකට Express dependencies එකතු වෙලා තියෙන්නේ. දැන් app එකක් හදන්න මෙන්න මේ විදිහ...

Introducing props

React alloıs us to send data to a component in the same syntax as HTML, using attributes or properties on a component. This is akin to passing the src attribute to an image tag. We can think about the property of the  < img /> tag as a prop we're setting on a component called img . We can access these properties inside a component as this.props . Let's see props in action. Recall, we defined the  < Header /> component as:   When we use the < Header /> component, we placed it in our component as like so: We can pass in our title as a prop as an attribute on the < Header / > by updating the usage of the component setting the attribute called title to some string, like so:  Inside of our component, we can access this title prop from the this.props property in the Header class. Instead of setting the title statically as Timeline in the template, we can replace it with the property passed in.  Now our  < ...

Express.js වලින් වැඩ ගන්න

කොහොමද අපේ වැඩ්ඩො ටික … . අද මං මෙ ලිපියෙන් ගේන්නේ server side වැඩ කරන්න පුළුවන් framework එකක් ගැන . ඒ Express Js . නමින්ම එක Express . ඒ බව මේ Framework එකෙන් වැඩ කරද්දි ඔයාට තේරෙයි . Express වලින් වැඩ ගන්න නම් ඔයා මිට කලින් NodeJs ගැනයි JavaScript ගැනයි දැනගෙන ඉන්න ඕනේ … මොකක්ද මේ Express කියන්නේ ? Express හදලා තියෙන්නේ server side එහෙමත් නැතිනම් back end එකේ implementation වලට . Back-end, Front-end ගැන අපි කලින් කතා කරලා තියෙනවා . Express වලින් පුළුවන් ඔයාගේ computer එකේ port එකක් http සදහා open කරන්න . එහෙම කරලා ඔයාට පුළුවන් ඔයාගේ computer එකේ වෙබ් අඩවියක් උනත් publish   කරන්න . ●        Web application නිර්මාණය කිරීමට සහ API නිර්මාණය කිරීමට ●        බොහෝ විශේෂාංග සහිත වීම (available via plugins) ●        පැමිනෙණ requests දිෂාගත කළ හැකි වීම (routing) ●    ...