Git task | Notes | Git commands |
---|---|---|
Segundo Douglas Crockford, todos os padrões descritos em javascript.crockford.com/code.html são os mesmos utilizados em Java.
Os arquivos, tanto .js quanto .css devem ter seus nomes desta forma: nome-do-arquivos.css ou apenas nome-do-arquivos.css. Caso o arquivo faça referência a um framework ou biblioteca use por exemplo: bootstrap-nome-do-arquivos.css ou jquery-nome-do-arquivos.css. Se o arquivo estiver minificado use por exemplo nome-do-arquivos.min.css.
É o identificador válido único de um elemento HTML que será usado no CSS para determinar qual elemento receberá o estilo. Também é usado no Javascript para manipulação do DOM. Ex.: nomeElemento ou NomeElemento.
Segundo Douglas Crockford, todos os padrões descritos em javascript.crockford.com/code.html são os mesmos utilizados em Java. Os padrões devem permanecer, apesar de não ser o mesmo adotado em outras linguagens, como o C#, por exemplo.
Os arquivos, tanto .js quanto .css devem ter seus nomes desta forma: nome-do-arquivos.css ou apenas nome-do-arquivos.js. Caso o arquivo faça referência a um framework ou biblioteca use por exemplo: bootstrap-nome-do-arquivos.js ou jquery-nome-do-arquivos.js. Se o arquivo estiver minificado use por exemplo nome-do-arquivos.min.js.
O que seriam os métodos no C# são as funções no Javascript. Mas diferente do C#, devem começar com letra minúscula e para cada palavra, a primeira letra deve ser maiúscula (lowerCamelCase).
ASP.NET Routing is the ability to have URLs represent abstract actions rather than concrete, physical files.
In "traditional" websites, every URL represents a physical file, whether it is an HTML or ASPX page, or a script file, or some other content. If I see a URL of www.example.com/articles/post.aspx?id=65, I'm going to assume that that URL represents a folder called articles at the root of the site, and within that folder a page called post.aspx.
In MVC, no such physical folders and pages exist, and so the MVC architecture allows us to map routes to controllers and actions which may represent many kinds of results. Routing is a layer of abstraction on top of regular URLs that allows programmers greater control over what those URLs mean and how they are formatted.
Please note that we are working with a modern JavaScript library for manipulating our SVGs. Older and non-supporting browsers will not be capable of all features.
The first thing we do is to create some SVG icons using an SVG editor like Inkscape. We used a size of 64×64 pixel for the icons.
For each icon we want a special animation to happen. For example, for the zoom icon we’ll want to scale up the plus path. We’ll define what will happen for each icon in our script.
We’ll add the icons dynamically to our page using Snap.svg and if SVG is not supported we’ll simply show a background image for the span elements that we use to wrap each graphic:
<section class="si-icons">
<span class="si-icon si-icon-play" data-icon-name="play"></span>
<span class="si-icon si-icon-monitor" data-icon-name="monitor"></span>
/* Basic CSS Styling */ | |
ul { list-style: none; } | |
a.button { | |
display: block; | |
float: left; | |
position: relative; | |
height: 25px; | |
width: 80px; | |
margin: 0 10px 18px 0; |
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} |
Before we jump into the code, it is important to understand that progressive web apps have the following characteristics:
- Progressive. By definition, a progressive web app must work on any device and enhance progressively, taking advantage of any features available on the user’s device and browser.
- Discoverable. Because a progressive web app is a website, it should be discoverable in search engines. This is a major advantage over native applications, which still lag behind websites in searchability.
- Linkable. As another characteristic inherited from websites, a well-designed website should use the URI to indicate the current state of the application. This will enable the web app to retain or reload its state when the user bookmarks or shares the app’s URL.
- Responsive. A progressive web app’
In ASP.NET MVC, there are several ways to validate the model data prior to saving the data into the data store.
- Validate the model data explicitly
- Implement the IValidateableObject interface
- Specify Data Annotations [Recommended]
Data Annotation is recommended because there are built-in Data Annotations in .NET Framework. You don’t have to implement your own validation logic, instead specifying the Validation Data Annotation that you need. The Data Annotations specified support both server-side & client-side validation. In case the built-in cannot fulfill your requirements, you can also implement your own Data Annotation.
Built-in Data Annotations