Showing posts with label guidelines. Show all posts
Showing posts with label guidelines. Show all posts

Saturday, November 3, 2007

Installing Windows, Ubuntu7.10, Mac OS 10.4.10 on MacBook (Triple Boot)


I am happy with my MacBook with its running Mac OS X 10.4.10. I can't stand working on windows any more, I feel more comfortable with Mac OS.

My master Thesis is running on linux environment(basically Fedora, but I successfully turned it to be Ubuntu)
My current project delivery should be done on windows. An easy solution costing 60$ would be to purchase Fusion.
Although Fusion looks very interesting, I didn't submit to this solution, for the following reasons:
  1. Running virtual machines consumes more memory, in this case I will loose some performance which is something I will certainly need during development.
  2. More memory usage, means more power consumptions, hence less battery life time. in normal cases I enjoy having ~4hrs battery life time with my lovely Mac. this is sthg i don't stand to loose.
  3. to overcome the first problem, I can extend my RAM. this will make the virtual software costs me almost (60+90)$....I really can't afford this for now. (I didn't get paid for salary 3 months ago)
So, I decided to to create a triple boot on my MacBook. It was a very risky step for me..But here we go, I have nothing to loose anyway (keeping in mind 150$ :S, 900 LE when converted to our local currency!!!!!! )

My MAC specs are:
Processor: 2.16GHz Intel Core 2 Duo
Memory: 1 GB 667 MHz DDR2 SDRAM
MAC OS X: 10.4.10

The target is to install Ubuntu 7.10 and WinXP SP2 on MacBook.
steps:
  1. Get BootCamp: I think it may force you to update to Mac 10.5. (luckily I installed it 1 month ago before leopard is released)
  2. Update your Mac OS.
  3. Install rEFIT.
  4. run BootCamp assistant and follow instructions to burn driver CD for windows. (don't proceed with installing steps)
  5. Backup your data. (you may not loose your data if things go smoothly)
  6. Check your disk partitions and identify the Mac Partion. I most cases it is /dev/disk0s2. but if you are not sure, you can verify this by running a shell command using the diskutil:
    $ diskutil list
    resize your HDD using Diskutil by running the following command. first you specify the volume to be resized, and its new size, then the type, and the name of the new volumes followed by their size.
    $ diskutil resizeVolume /dev/disk0s2 70G "Linux" "Linux" 20G "MS-DOS FAT32" "Windows" 20G
  7. insert your XP SP2 CD and hold down the "ALT" key.
  8. install XP on the valid partition, just give it a quick FAT32 format.
  9. you should now have a dual boot(windows with Mac).
  10. insert your Ubuntu 7.10 Live CD.
  11. run the installation normally. You should set up the partition manually. Don't mount the EFI system partition. you need only to mount / to the drive you allocated to your linux installation. I didn't make a SWAP file, I just don't need this for now, I relied on my 1GB RAM.
  12. Continue through the installation steps.
  13. When you reboot, you should have triple boot.

Saturday, March 31, 2007

RJS Templates for Rails

Ruby on Rails has excellent support for Ajax baked right into the framework. Remote JavaScript (RJS) templates build upon the Ajax support offered by Rails, allow to easily update multiple page elements.
This is a quick start to work with RJS.
$ rails RJS_Example

Create your controller:

RJS_Example> ruby script/generate controller Examples
exists app/controllers/
exists app/helpers/
create app/views/examples
create test/functional/
create app/controllers/examples_controller.rb
create test/functional/examples_controller_test.rb
create app/helpers/examples_helper.rb


Let's modify the default controllers now:
class ExamplesController < ApplicationController 
def index
end
def display
@statement = params[:statement]
end
end

Now, we should go to create our views.
Create in the $RJS_Example/app/views/examples create your index.rhtml
In the header include this tag
    <%= javascript_include_tag :defaults %>

The :defaults helps to add all the Scriptaculous visual effects and controls.

In the body, add this code.
    <%= form_remote_tag :url => { :action => 'display' },
:html => { :id => 'display-form' } %>
<%= text_field_tag 'statement', nil, :size => 40 %>
<%= submit_tag 'submit statement' %>
<%= end_form_tag %>

We use the form_remote_tag() helper instead of the form_tag().
:html option helps to reset the form after completion.
:url option specifies the controller action that receives the form data.
Finally the empty "div id=statement",The id provides a way to reference the element from the RJS template.

Create partial template app/views/examples/_example.rhtml
<%=h example %>

Create the RJS template: app/views/examples/display.rjs
page.insert_html :bottom, 'statements', :partial => 'example'
page.visual_effect :highlight, 'statements'
page.form.reset 'display-form'

The page object is an instance of the Rails JavaScriptGenerator.
the partial template app/views/examples/_example.rhtml is rendered, and the resulting content is inserted into the bottom of the statements div.

Monday, February 26, 2007

WCAG

Web Content Accessibility Guidelines (WCAG) are part of a series of Web accessibility guidelines published by the W3C's Web Accessibility Initiative (WAI). They consist of a set of guidelines on making content accessible, primarily for disabled users, but also for all user agents, including highly limited devices, such as mobile phones.

Web "content" generally refers to the information in a Web page or Web application, including text, images, forms, sounds, and such. More specific definitions are available in the WCAG documents.

WCAG technical documents are developed by the Web Content Accessibility Guidelines Working Group (WCAG WG), which is part of the World Wide Web Consortium (W3C) Web Accessibility Initiative (WAI). Other accessibility guidelines include the Authoring Tool Accessibility Guidelines (ATAG) and the User Agent Accessibility Guidelines (UAAG).

The WCAG are intended for all Web content developers (page authors and site designers) and for developers of authoring tools. Following them will make Web content more available to all users, whatever user agent they are using (desktop browser, voice browser, mobile phone, etc.) or constraints they may be operating under (noisy surroundings, hands-free environment, etc.). These guidelines do not discourage content developers from using images, video, etc., but rather explain how to make multimedia content more accessible to a wide audience.

There are currently two versions of the WCAG. WCAG 1, contains 14 main guidelines with a total of 65 in all. WCAG 2, has reorganized and combined many of the WCAG 1 guidelines to create 21 new ones.

Each guideline has a one or more ‘checkpoints’ which developers should consider to ensure the accessibility of a Web page. Each checkpoint has a priority level based on its impact on Web accessibility. The WCAG provides a number of examples and techniques to help Web developers to implement the guidelines.

WCAG Priority Levels

Each checkpoint has a priority level assigned by the Working Group based on the checkpoint's impact on accessibility:

[Priority 1]
A Web content developer must satisfy this checkpoint. Otherwise, one or more groups will find it impossible to access information in the document. Satisfying this checkpoint is a basic requirement for some groups to be able to use Web documents.

[Priority 2]
A Web content developer should satisfy this checkpoint. Otherwise, one or more groups will find it difficult to access information in the document. Satisfying this checkpoint will remove significant barriers to accessing Web documents.

[Priority 3]
A Web content developer may address this checkpoint. Otherwise, one or more groups will find it somewhat difficult to access information in the document. Satisfying this checkpoint will improve access to Web documents.

WCAG Conformance

The WCAG guidelines have three levels of conformance:

Conformance Level "A": all Priority 1 checkpoints are satisfied. This is known as 'WCAG A' compliant.

Conformance Level "Double-A": all Priority 1 and 2 checkpoints are satisfied. This is known as 'WCAG AA' compliant.

Conformance Level "Triple-A": all Priority 1, 2, and 3 checkpoints are satisfied. This is known as 'WCAG AAA' compliant.

Note that conformance levels are even spelled out in text so they may be understood when rendered to speech.

In the following posts, insha Allah, we will go through the main guidelines of different versions of the WCAG.