技術情報
- 2020年01月30日
- 技術情報
CakePHP データベースとの接続
nishida at 2020年01月30日 10:00:29
- 2020年01月24日
- 技術情報
Brave Browser
Today I will talk about a trendy browser called brave. Lets check it out.
Barve ?
Brave is a more-or-less standard browser that lets users navigate to websites, run web apps and display or play online content. Like other browsers, it is free to download and use, remembers site authentication information and can block online ads from appearing on sites.
Its maker, Brave Software, is a relatively new entry in the browser battles, having first previewed the browser in January 2016. The firm was co-founded by Brendan Eich, the creator of JavaScript and a co-founder of Mozilla.
Any Differences ?
What sets Brave apart is its aggressive anti-ad attitude. The browser was built to strip online ads from websites and its maker’s business model relies not only on ad blocking, but on replacing the scratched-out ads with advertisements from its own network. It’s as if a new TV network announced it would use technology to remove ads from other networks’ programs, then rebroadcast those programs with ads of its own devising, ads that it sold.
Interesting Fact
Brave is built upon Chromium, the open-source project Google and others maintain. (Google uses Chromium to provide the source code for its Chrome browser.) The back-end technologies that power Chrome – including the Blink rendering engine and the V8 JavaScript engine – also power Brave.
Brave boasts of two things: Its speed and the privacy it provides users. Both result from its ad-stripping strategy.
On the desktop, Brave loads pages twice as fast as Chrome and Firefox. On a smartphone, Brave loads pages up to eight times faster than Chrome (Android) or Safari (iOS).
The speed increases are not surprising. By eliminating ads and ad trackers, Brave downloads much less content from a website than any browser sans an ad blocking extension. There’s nothing technological about Brave’s performance; it’s simply retrieving less data than other browsers. (If that weren’t the case, Chrome and other Chromium-based browsers would be just as fast.)
Economy
The foundation of the Brave economy will be “Basic Attention Tokens” or BATs, which have a value derived from a cyber-currency. Those tokens will be awarded based on user attention, or more plainly, time spent viewing ads and content. Brave users who agree to receive ads will be rewarded with BATs. Brave envisions users trading their tokens for premium content or advanced site features.
Download brave here.
https://brave.com/download/
By Yuuma.
yuuma at 2020年01月24日 10:30:02
- 2020年01月16日
- 技術情報
PSR (PHP Standards Recommendation)
Today, I would like to share about PSR called PHP Standards Recommendation which are also known as coding standards of PHP. Actually, PHP does not have coding rules and standards itself. Developers tend to create their code to be more maintainable & safer by using naming conventions and various coding styles. Some use frameworks like PEAR, Zend to standardize their code.
Just In Case If you don’t know about `coding standards`
Coding rules and guidelines ensure that software is:
- Safe: It can be used without causing harm.
- Secure: It can’t be hacked.
- Reliable: It functions as it should, every time.
- Testable: It can be tested at the code level.
- Maintainable: It can be maintained, even as your codebase grows.
- Portable: It works the same in every environment.
Standards are important for safety, security, and reliability.
Every development team should use a standard. Even the most experienced developer could introduce a coding defect — without realizing it. And that one defect could lead to a minor glitch. Or worse, a serious security breach.
There are four main drivers for using one:
- Compliance with industry standards (e.g., ISO).
- Consistent code quality – no matter who writes the code.
- Software security from the start.
- Reduced development costs and accelerated time to market.
In 2009, There was a conference about PHP (https://tek.phparch.com/). At that conference, developers discussed about their opinions on working PHP projects and their complexities upon them. Finally, they decided to create coding standards to follow. The name of that association was PHP Standards Group. They updated their name as Framework Interoperability Group(FIG) later. You can see more detail about FIG here (https://www.php-fig.org/).
Currently there are 13 approved standards.
1 Basic Coding Standard
2 Coding Style Guide
3 Logger Interface
4 Autoloading Standard
6 Caching Interface
7 HTTP Message Interface
11 Container Interface
13 Hypermedia Links
14 Event Dispatcher
15 HTTP Handlers
16 Simple Cache
17 HTTP Factories
18 HTTP Client
If you are still curious to know about other standards that are currently reviewed, draft, abandoned. Check out this official link (https://www.php-fig.org/psr/).
By Yuuma.
yuuma at 2020年01月16日 05:24:02
- 2020年01月16日
- 技術情報
CakePHP フォームヘルパー(2)
本記事は前回の「CakePHP フォームヘルパー(1)」の続きです。
前回はCakePHPの「フォームヘルパー」という機能を使用して、入力フォーム用のHTMLを作成しました。
今回はそのフォームを使用して送信(Submit)された値をコントローラー側で受け取る方法を説明いたします。
nishida at 2020年01月16日 10:00:36
- 2020年01月10日
- 技術情報
PWA (Progressive web application)
Let’s say you have a website and you want to give your website as mobility experience to your customers. Well you have to consider the PWA. Let’s see how PWA can offer mobility experiences to consumers.
If you visit the website, you will get alert to add to your home screen for this website as a PWA application. If you accept it, the PWA will be installed to your phone and you can access the website through application next time. Cool , I know right !
Although PWA works across both iOS and Android, the specifications of Safari affect which functions iOS users can access. For Android users, PWA can be added via multiple browsers. Also PWA is a project started by Google, and it is quite more compatible with Android.
Let’s discuss some of the core attributes which are missing from common non-progressive web applications.
- Reliable
The app should be lightning fast when loading, it should be close to instantaneous and should also open when there is no network or fairly low-speed network. - Fast
The scrolls and page transitions should be buttery smooth when the user is interacting with the web app. Everyone hates crappy scrolls. - Responsive
The app should fit in all the different sizes of devices. The perfect web app should be like liquid, which takes the shape of its vessel. - Installable
If we want to make web apps closer to the native apps, they have to be installable and should reside in the home screen along with other native apps, so that the user can access the PWA in one click. - Splash Screen
PWA adds a splash screen during the startup of the app. This makes the PWA feel more like a native app.
As an addition, all you need to setup PWA is that you just have to know some Javascript. PWA has some important technical components which work together and energizes the regular web app.
- Service worker
- manifest json
- And your site need to be in https.
These are the important things to setup your PWA.
Service Worker
Our web apps talk to the network directly and if there is no network, the screen shows the famous dinosaur. For the first-time load, the service worker stores the required resources in the browser cache. And when the user visits the app next time, the service workers check the cache and returns the response to the user before even checking the network.
Manifest Json File
The manifest file is a config JSON file which contains the information of your application, like the icon to be displayed on the home screen when installed, the short name of the application, background color, or theme.
Https
Service workers have the ability to intercept the network requests and can modify the responses. Service workers perform all the actions on the client side. Hence, PWA requires secure protocol HTTPS.
Here is the official documentation to build PWA from google.
https://codelabs.developers.google.com/codelabs/your-first-pwapp/#0
By Yuuma
yuuma at 2020年01月10日 11:00:29