Dojo… Get It On! ( Learning Dojo ) – Cody Lindley
http://www.sitepen.com/blog/2010/03/05/learning-dojo/
Check out this blog and get up to speed in a organized fashion.
Fantastic post!
http://www.sitepen.com/blog/2010/03/05/learning-dojo/
Check out this blog and get up to speed in a organized fashion.
Fantastic post!
Do your self the favor of learning WCF even if you don’t use it – b/c MVC & WCF are using lots of the same components.
This blog series is amazing: http://blogs.msdn.com/endpoint/archive/2010/01/06/introducing-wcf-webhttp-services-in-net-4.aspx
> Especially (IMHO) this blog on ROUTES: (used in MVC & WCF 4.0) : http://blogs.msdn.com/endpoint/archive/2010/01/25/using-routes-to-compose-wcf-webhttp-services.aspx
Beyond that, if you are using ASP.NET MVC RC2… well you need a book, and Jeffrey Palermo has been writing one that you can help him edit on : GIT
> http://github.com/jeffreypalermo/mvc2inaction
Learn, Build, Reap.
Write for the masses or for hotness…
Though dojo is an amazing javascript framework, it’s complexity is mirrored by its various documentation sources. Erick Fleming and I have been working with dojo and some of the more recent additions. This is what we’re using:
This is where the main documentation for dojo can be found, search is good but must be dead on – use google :site docs.dojocampus.org if you don’t know exactly what you are looking for.
We don’t use the existing api.dojotoolkit.org site very much. The redesign site is better.
> But you may need to switch to OLDER versions (drop down)
You can find up to date & tracked bugs, status, etc.. on this site. Very helpful when you are having *strange* issues.
> Also be careful if you are using a CDN, sometimes the patches have not made their way to the CDN’s and you need to use the latest build (e.g. a local copy)
Here are were you can find tests of the various widgets in action – helpful for seeing what works, how it works etc…
This is an amazing site / amazing test suite… check it out just for fun (if nothing else).
Directory:
Eye popping, cool D.O.H. = Dojo Objective Harness (WOW these guys are bad asses)
http://en.wikipedia.org/wiki/Internet_media_type
- Type
application: Multipurpose files
application/x-www-form-urlencodedForm Encoded Data XDapplication/EDI-X12: EDI X12 data; Defined in RFC 1767application/EDIFACT: EDI EDIFACT data; Defined in RFC 1767application/javascript: JavaScript; Defined in RFC 4329 but not accepted in IE 8 or earlierapplication/octet-stream: Arbitrary binary data[4]. Generally speaking this type identifies files that are not associated with a specific application. Contrary to past assumptions by software packages such as Apache this is not a type that should be applied to unknown files. In such a case, a server or application should not indicate a content type, as it may be incorrect, but rather, should omit the type in order to allow the recipient to guess the type.[5]application/ogg: Ogg, a multimedia bitstream container format; Defined in RFC 5334application/pdf: Portable Document Format, PDF has been in use for document exchange on the Internet since 1993; Defined in RFC 3778application/xhtml+xml: XHTML; Defined by RFC 3236application/xml-dtd: DTD files; Defined by RFC 3023application/json: JavaScript Object Notation JSON; Defined in RFC 4627application/zip: ZIP archive files; Registered[6]- Type
audio: Audio
audio/basic: mulaw audio at 8KHz, 1 channel; Defined in RFC 2046audio/mp4: MP4 audioaudio/mpeg: MP3 or other MPEG audio; Defined in RFC 3003audio/ogg: Ogg Vorbis, Speex, Flac and other audio; Defined in RFC 5334audio/vorbis: Vorbis encoded audio; Defined in RFC 5215audio/x-ms-wma: Windows Media Audio; Documented in Microsoft KB 288102audio/vnd.rn-realaudio: RealAudio; Documented in RealPlayer Customer Support Answer 2559audio/vnd.wave: WAV audio; Defined in RFC 2361- Type
image
image/gif: GIF image; Defined in RFC 2045 and RFC 2046image/jpeg: JPEG JFIF image; Defined in RFC 2045 and RFC 2046image/png: Portable Network Graphics; Registered[7], Defined in RFC 2083image/svg+xml: SVG vector image; Defined in RFC 3023image/tiff: Tag Image File Format; Defined in RFC 3302image/vnd.microsoft.icon: ICO image; Registered[8]- Type
message
message/http- Type
model: 3D models- Type
multipart: Archives and other objects made of more than one part
multipart/mixed: MIME E-mail; Defined in RFC 2045 and RFC 2046multipart/alternative: MIME E-mail; Defined in RFC 2045 and RFC 2046multipart/related: MIME E-mail; Defined in RFC 2387 and used by MHTML (HTML mail)multipart/form-data: MIME Webform; Defined in RFC 2388multipart/signed: Defined in RFC 1847multipart/encrypted: Defined in RFC 1847- Type
text: Human-readable text and source code
text/css: Cascading Style Sheets; Defined in RFC 2318text/csv: Comma-separated values; Defined in RFC 4180text/html: HTML; Defined in RFC 2854text/javascript(Obsolete): JavaScript; Defined in and obsoleted by RFC 4329 in order to discourage its usage in favor ofapplication/javascript. However,text/javascriptis allowed in HTML 4 and 5 and, unlikeapplication/javascript, has cross-browser supporttext/plain: Textual data; Defined in RFC 2046 and RFC 3676text/xml: Extensible Markup Language; Defined in RFC 3023- Type
video: Video
video/mpeg: MPEG-1 video with multiplexed audio; Defined in RFC 2045 and RFC 2046video/mp4: MP4 video; Defined in RFC 4337video/ogg: Ogg Theora or other video (with audio); Defined in RFC 5334video/quicktime: QuickTime video; Registered[9]video/x-ms-wmv: Windows Media Video; Documented in Microsoft KB 288102
- Type
vnd: Vendor Specific Files [10]
application/vnd.oasis.opendocument.text: OpenDocument Text; Registered [11]application/vnd.oasis.opendocument.spreadsheet: OpenDocument Spreadsheet; Registered [12]application/vnd.oasis.opendocument.presentation: OpenDocument Presentation; Registered [13]application/vnd.oasis.opendocument.graphics: OpenDocument Graphics; Registered [14]application/vnd.ms-excel: Microsoft Excel filesapplication/vnd.ms-powerpoint: Microsoft Powerpoint filesapplication/msword: Microsoft Word filesapplication/vnd.mozilla.xul+xml: Mozilla XUL files
- Type
x: Non-standard files[10]
application/x-dvi: Digital Video files in DVI formatapplication/x-httpd-php: PHP filesapplication/x-httpd-php-source: PHP source filesapplication/x-latex: LaTeX filesapplication/x-shockwave-flash: Adobe Flash files; Documented in Adobe TechNote tn_4151 and Adobe TechNote tn_16509application/x-stuffit: StuffIt archive filesapplication/x-rar-compressed: RAR archive filesapplication/x-tar: Tarball files
- Type
x-pkcs: PKCS standard files
application/x-pkcs12: p12 filesapplication/x-pkcs12: pfx filesapplication/x-pkcs7-certificates: p7b filesapplication/x-pkcs7-certificates: spc filesapplication/x-pkcs7-certreqresp: p7r filesapplication/x-pkcs7-mime: p7c filesapplication/x-pkcs7-mime: p7m filesapplication/x-pkcs7-signature: p7s files
1xx - Informational
2xx - Successful
3xx - Redirection
4xx - Client Error
5xx - Server Error
If you have ever used linux and currently use windows, you probably miss the ability to create symbolic links, hard links, etc.. between 2 directories or files.
The idea being that where a file is logically located should be independent of where it is physically located.
Example, let’s say you have some JavaScript or HTML files located in one project that you want to share with another. DRY (don’t repeat yourself) forces you to the realization that you do NOT want to COPY / PASTE. So you could just put the files in one directory and LINK to it from the other.
Read about it: This is the best article I found.
http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/
Here is the technical bit:
http://technet.microsoft.com/en-us/library/cc753194%28WS.10%29.aspx
Mklink
Updated: April 25, 2007
Creates a symbolic link.
For examples of how to use this command, see Examples.
Syntax
mklink [[/d] | [/h] | [/j]] <Link> <Target>
Parameters
Parameter
Description
/d
Creates a directory symbolic link. By default, mklink creates a file symbolic link.
/h
Creates a hard link instead of a symbolic link.
/j
Creates a Directory Junction.
<Link>
Specifies the name of the symbolic link that is being created.
<Target>
Specifies the path (relative or absolute) that the new symbolic link refers to.
/?
Displays help at the command prompt.
Examples
To create a symbolic link named MyDocs from the root directory to the \Users\User1\Documents directory, type:
mklink /d \MyDocs \Users\User1\Documents
All of this (and prev blogs posts) information comes from 1 awesome source that I recommend you buy. CSS Mastery (Advanced Web Standards Solutions)
Get the cheet sheet! http://www.milkaddict.com/wp-content/uploads/2009/11/css-cheat-sheet-v2.png
All elements are rectangles with characteristics ( offset, margin, border, padding, width, height ) See firebug for an example:
IE uses a non-standard boxing model. (IE < version 7) (quirks mode). Width property is considered equal to the SUM of the widths of: content, padding & borders. Standard boxing model indicates width is the width of the element. So for IE v6 & earlier, if you specify a width and then padding & border – the item’s width is reduced to accommodate the added widths of the padding / border.
Solution: Don’t specify padding/border width along with content width. Want to know more? Go here:
http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug
This blog gives a nice summary. http://www.milkaddict.com/css-margin-collapsing/ The idea is that the box model will have items above collapse the margins of items below. Elements contained within other elements will have their margins collapse before the outer margins do.
Whose margins collapse:
Block Level Elements are elements that are displayed as blockes or boxes of content:
Inline Elements are items that are displayed on one line (inline) such as:
The differences between these types is the DISPLAY property.
3 different types of positioning in HTML:
Inline Boxes = normal flow dictates left to right horizontal stacking
Block Boxes = normal flow dictates top down vertical stacking
Allows the element to be positioned relative to its normal position. The element will continue to occupy the the original space (with or without the offset) – the implication can be overlap.
Positioning is in relation to the nearest positioned ancestor (the tag in which it is nested).
Stacking (who is on top) can be controlled based on a z-index value. Higher the z-index, high up the box appears (more in front).
There is a bug in IE 5.5 & 6 when absolute position is set in relation to a relatively positioned element that DID NOT have dimensions set (IE just sets absolute in relation to canvas) – so set the dimensions.
Absolute positioned items are not considered part of the normal flow. They will not affect the layout of relative or normal flow positioned elements.
The fixed element block is set relative to the viewport (window) and thus the element will always stay in the viewable window. (not supported by IE6 and below, IE7 partially supports it… There are workarounds [ugh])
This is a complex and very important topic that you need to understand. That said, after reading it, I’ll refer you to some other sources as I don’t want to recreate what they have.
This site covers FLOAT & CLEAR: http://www.positioniseverything.net/easyclearing.html
I also recommend a framework that Erick Flemming and I are using on our project. The guy who wrote it is German, so you know it’s good ;-), YAML – Yet Another Multicolumn Layout.
http://www.yaml.de/en/home.html
"Yet Another Multicolumn Layout" (YAML) is an (X)HTML/CSS framework for creating modern and flexible floated layouts. The structure is extremely versatile in its programming and absolutely accessible for end users.
He even has a solid YAML BUILDER. http://builder.yaml.de/
Depending on your preference, you either love or hate CSS. Either way you better know it. Let’s cover some basics.
Cascading refers to the nature of the selection. Styles are applied using the following prioritization:
Given that elements are often select by more than one selector, the applied style is the more specific of the two. Specificity is calculated based on the following rules (note calculation is NOT base 10).
| Style | Specificity Value | Specificity |
| Style="color:red;” | 1,0,0,0 | Highest |
|
0,2,0,0 | |
| #foo .bar {} | 0,1,1,0 | |
| a#foo{} | 0,1,0,1 | |
| p.foo .bar{} | 0,0,2,1 | |
| p.bar{} | 0,0,1,1 | |
| div a{} | 0,0,0,2 | |
| a {} | 0,0,0,1 | Lowest |
Styles are inherited by more general rules when not specified for an element by a more specific selector. Remember that the browser applied styles to specific elements – so they (h1,h2,…) will often not inherit values if a style did not specifically target them.
**Note: Any style applied to a specific element will override any inherited style.
Classes versus ID’s
html:
<a id=”Name” …
<a class=”Name” …
css:
.Name = class “Name”
#Name = id “Name”
css:
/* make all unvisited links blue */
a:link{color:blue;}
/* visited links green */
a:visited{color:green;}
/* makes links red when hovered or activated, focus for keyboards */
a:hover, a:focus, a:active, {color:red;}
/* makes table rows red when hovered over */
tr:hover{background-color: red;}
/* makes input elements yellow when focus is applied */
input: focus {background-color:yellow;}
** Note: :link and :visited are LINK psuedo-classes and can only be applied to “<a “.
** Note: :hover, :active, and :focus are DYNAMIC psudo-classes and can be applied almost everywhere (though IE6 & IE7 are quirky).
Apply styling to everything on a page.
/* remove all padding & margins */
*{
padding: 0;
margin: 0;
}
Supported by most modern browsers (not IE6). If a browser doesn’t support a rule/feature, the whole rule is ignored. Child selector is supported in IE7 (unless there are comments between the parent & child)
css
/* list items that are nested in the #nav ID will have this rule applied */
#nav>li{
background: url(folder.png no-repeat left top;
padding-left: 20px;
}
html
<ul id=”nav”>
<li> A <!—will be applied –> </li>
<li> B <!—will be applied –>
<ul>
<li> C <!—will not be applied –> </li>
<li> D <!—will not be applied –> </li>
</ul>
</li>
</ul>
h2 + p would look for a paragraph that follows an h2.
<h2> Hey! </h2>
<p> This is what that selector would apply to </p>
When you hover over an element with a title attribute most browsers will display a tooltip.
acronym[title]: hover, acronym[title]:focus{ cursor: help; }
<p> A < acronym title=”DataBase Admin”>DBA</acronym> is not a fun job </p>
Due to the lack of HTML elements, several HTML / CSS Microformats have been adopted w/ many draft formats in play. They have an official ORG HOME: http://microformats.org/ :: about (http://microformats.org/about)