네트워크 사용량을 줄이기 위해 코드압축기를 사용해 코드를 압축하는 일은
자바스크립트 라이브러리를 배포할때 중요하다. 압축은 코드를 알아볼수 없기 때문에
배포번에 사용해야 한다.
압축기는 세 종류가 있는데,
1. 코드와 관련없는 공백이나 주석을 모두 제거해 핵심코드만 남기는 압축기
2. 공백과 주석을 제거하고 모든 변수의 이름을 짧게 만드는 압축기
3. 위의 두가지를 만족하고, 변수이름뿐만 아니라 코드안에 있는 모든 단어의 길이를
최소화하는 압축기.

아래는 압축기 라이브러리 사이트이다.
JSMin 은 코드를 제외한 공백이나 주석제거(1번)
Packer는 모든 단어를 완전히 압축.(3번)

JSMin : http://www.crockford.com/javascript/jsmin.html
Packer : http://dean.edwards.name/packer/



크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 17:47 2011/04/01 17:47
, , ,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6033

[javascript] 코드 정리 - JSLint.com

JSLint는 일련의 규칙을 가지고 문제를 일으킬만한 코드를 집어낸다.
JSLint에서 사용하는 모든 규칙과 설정에 대한 정보는 http://jslint.com/

JSLint에서 내세우는 요구사항 중 하나는 모든 프로그램에서 변수를 사용하기 전에
반드시 선언해야 한다는 것이다.

// JSLint 에서 요구하는 변수 선언
// 잘못된 변수 선언
foo = 'bar';

// 올바른 변수선언
var foo;

foo = 'bar';
!=,== 보다는 !==, === 를 사용하라고 요구한다.
!==, === 는 변수 안의 실제값을 들여다 보기 때문이다.

//!=, == 가 !==, === 와 어떻게 다른지를 보여주는 예들
// 둘 다 true
null == false
0 == undefined

// !== 과 === 를 대신 사용해야 한다.
null !== false
false === false
한 줄짜리 블록을 사용하지말라고 요구한다.
중괄호를 제거하면 코드에서 어떤 부분이 블록에 속하고 어떤 부분이 속하지 않는지
알기 어려울 수 있다.

//들여쓰기를 잘못한 단일 문장을 포함하는 코드 블록
// 적법한 일반적인 자바스크립트 코드다.
if ( dog == cat )
if ( cat == mouse )
mouse = "cheese";

// JSLint 는 이 코드를 다음과 같이 쓰라고 요구한다:
if ( dog == cat ) {
    if ( cat == mouse ) {
        mouse = "cheese";
    }
}
한줄에 한문장만 쓸경우  문장 끝에 있는 세미콜론을 생략할 수 있지만, 압축 했을때 파일크기를 줄이기 위해 끝줄들을 제거한다거나 하면 문제가 생긴다.
항상 세미콜론을 입력해야 한다.

//세미콜론이 필요한 문장들
//자바스크립트 코드를 압축할 계획이라면 모든 문장 끝에 세미콜론을 입력해야 한다.
var foo = 'bar';
var bar = function(){
    alert('hello');    
};
bar();







크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 17:32 2011/04/01 17:32
,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6032

[javascript] YUI - Yahoo UI

http://developer.yahoo.com/yui/

YUI Library

The YUI Library is a set of utilities and controls, written with JavaScript and CSS, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX. YUI is available under a BSD license and is free for all uses.


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 16:54 2011/04/01 16:54
, ,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6031

자바스크립트에서 네임스페이스 만들기와 그 구현방법

네임스페이스(namespacing)는 코드를 깔끔하고 단순하게 만드는 간단하면서도
중요한 개념이다. 자바스크립트는 아직까지는 네임스페이스 만들기를 지원하지 않는다.
그래서, 네임스페이스를 만들기 위한 간단하면서도 적당한 방법을 직접 고안해야 한다.

자바스크립트이 모든 객체는 프로퍼티를 가지고, 프로퍼티는 다시 다른 객체를 담을 수
있다는 사실을 기반으로, 다른 언어에서 네임스페이스를 만들 듯 아주 비슷한 모습으로
무언가를 만들수 있다.

아래와 같은 인기있는 프레임워크가 있다.
Dojo : http://dojotoolkit.org/
YUI  : http://developer.yahoo.com/yui/

//기본 전역 네임스페이스를 만든다.
var YAHOO = {};

//객체들을 사용해서 자식 네임스페이스 만들기를 준비한다.
YAHOO.util = {};

//함수 프로퍼티를 담는 마지막 네임스페이스를 만든다.
YAHOO.util.Event = {
    addEventListner: function(){...}
};

//특정 네임스페이스 안에 있는 함수를 호출한다.
YAHOO.util.Event.addEventListner(...)
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 16:51 2011/04/01 16:51
,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6030

1. prototype.js 를 먼저 Include 하며 마지막에 jquery.js 를 include 한다.
2. var $J = jQuery.noConflict(); 를 추가한다.
3. jquery 사용시 $ 대신 jQuery 를 사용한다.

ex.)
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
      var $J = jQuery.noConflict();

      jQuery(document).ready(function(){
          alert("Load Event");
          
          jQuery("#id").val("test");
      });
</script>
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 16:18 2011/04/01 16:18
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6029

Mockup 이란? 비행기나 자동차 따위를 개발할 때에, 각 부분의 배치를 보다 실제적으로 검토하기 위하여 제작하는 실물 크기의 모형.

MockUp : http://iphonemockup.lkmc.ch/

Nov 16, 2009
77
http://iphoneized.com/2009/11/21-proto ··· pment%2F

18 Mobile Frameworks and Development Tools for Creating iPhone Apps



iphonemockupSo you have a killer idea for an iPhone app, but when you describe it to people they just don’t get it. Maybe you have a client that is a visual thinker and needs you to draw it out for him. That’s when wireframes, mockups and stencils can be your saving grace.

There are many different types of tools available to developers, from low-tech stencil kits to high-tech collaborative software. So I’ve rounded up a few of the more popular ones people are using specifically for iPhone development. It’s far from being the definitive list, but it’s definitely a good place to start.



Low Tech Solutions

Notepod

notepod Notepod is a notepad shaped like an iPhone. Each notepod is 100 pages of 60 x 110mm double sided paper. The front has 52mm x 77mm blank space (the iPhone screen), the back is a 6mm grid.

Project Page


iPhone UI Stencil Kit

stencilkit The iPhone ui stencil kit is a stainless steel, laser cut stencil kit for drawing quick mock-ups and wireframes for iPhone apps. It also comes with a Zebra mechanical pencil.

Project Page


iPhone Sketch Pad

iphonesketchpad The iPhone Sketchpad works precisely with the iPhone Stencil Kit, with one phone silhouette on the front side and three on the back.

Project Page


App Sketchbook

appsketchbook The App Sketchbook has 50 Double-sided, perforated pages each with 3 actual sized iPhone templates. Each page also has has 20px ruler markings and a ruled section for notes.

Project Page


Vector Images

MetaSpark’s Fireworks Vectors

iphone_mockup_toolkit A collection of vector iPhone UI elements for Fireworks CS3 and CS4.

Project Page


320480 Stencil PSD file

320480 Most iPhone screen elements, sensible layer sets all contained within one PSD file.

Project Page


Graffletopia Stencil Kit for Omnigraffle

graffletopia Graffletopia’s stencil kit for Omnigraffle. It is for quick sketching of iPhone ideas. Use the outline for printouts so you can hand sketch as well. The symbols are meant as a check list for included features in your app development.

Project Page


MockApp

mockapp_ppt MockApp is a set of iPhone ui templates and library files put together for use in Powerpoint or Keynote.

Project Page


Firefox Plug-ins

iPhone Prototype

iphoneprototype This is a plug-in to browser Mozilla FireFox for prototyping interface of iPhone applications for creating an iPhone mock-up. Currently Alpha – not compatible with FF 3.55.

Project Page


Firefox Pencil

pencil Pencil is a free and opensource tool for making diagrams and GUI prototyping. Pencil runs on the Mozilla Gecko engine, turning the Firefox browser into a sketching tool with just a 400-kilobyte installation package.

Project Page


Fireworks Plug-ins

Unitid

fwphp This plug-in combines Fireworks with some jQuery and PHP to give you a prototype you can not only view, but interact with, directly on your iPhone, just as if it’s a live app.

Project Page


iPhone Apps

LiveView

liveview Liveview is an iPhone app that consists of two parts: the ScreenCaster and the Application itself.  ScreenCaster launches a simple iPhone skin on your Mac. From the same network, launch the LiveView app in your iPhone. Whatever the ScreenCaster is highlighting is now seen in the LiveView App. It also interprets touches as mouse clicks, turning it into a two way interactive prototype.

Project Page


Web Based Tools

Mockingbird

mockingbird Mockingbird is a web based mockup/wireframe tool built using the Cappucino framework, so there’s no flash to wrestle with. While you can’t actually design your mockups from an iPhone (who’d want to?), the tool does have some very handy features. You can drag elements onto the screen, create multiple pages, link to other pages and share directly from the web.

Project Page


Pidoco

pidoco-software-prototyping Pidoco is a web-based tool that lets you create clickable wireframes via drag & drop ui and then collaborate with remote users on each project. The tool also includes iPhone stencils.

Project Page


iPhone Mockup

iphonemockup iPhone mockup is a web based tool that is currently in Alpha release only. You can design your mockup as a hand sketch or illustration, and mockups can contain user-uploaded images and user-entered text. Your mockups will be accessible via url so they are unsecured.

The developer makes this perfectly clear and warns that he could discontinue hosting mockups at anytime, thereby deleting any work. That makes this a handy tool for quick and dirty mockups you want to print or share with someone on the fly, but not for much more.

Project Page


Protoshare

protoshare Protoshare is a collaborative, web-based prototyping tool that helps teams visualize requirements for interactive projects and work together in real-time. It has an iPhone component that can be seen here.

Project Page


iPlotz

iplotz With iPlotz you can create clickable, navigable wireframes to create the experience of a real website or software application. You can also invite others to comment on the designs, and once ready, you can then manage the tasks for developers and designers to build the project.

Project Page


Installed Software

CogTool

cogtool CogTool is a general purpose UI prototyping tool simply using a storyboard of your design idea with sketches, images or on a canvas. Demonstrate tasks on that storyboard, then press a button to produce a valid cognitive model predicting how long it will take a skilled user to complete those tasks.

Project Page


Balsamiq

balsamiq Balsamiq mockups is desktop software that is designed to help teams or clients collaborate on wireframes and mockups. There are iPhone specific controls included.

Project Page


OmniGraffle

OmniGraffle is award winning diagraming mockup or graphic design software. Combined with Graffletopia’s iPhone stencil kit, this software is a great addition to any app developers toolbox.

Project Page


Justinmind Prototyper

justinmind Justinmind prototyper allows you to create fully functional wireframes for mobile applications and generate your HTML high-fidelity wireframes.

Project Page


iRise

irise iRise for iPhones gives developers a way to quickly prototype the look, feel and behavior of Apple iPhone applications through pre-defined visualization widgets and templates that can be quickly assembled into a high definition mobile applications.

Project Page


크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 14:01 2011/04/01 14:01
,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6028

에스프레소를 마시는 진정한 자세!

에스프레소를 마시는 진정한 자세!
 술 마시고 에스프레소 시키지 맙시다.
.
.
.
응암동 불광천변 커피생각에서~
.
.
.

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 13:55 2011/04/01 13:55
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6027

2011.03.22 고양이들

2011.03.22 고양이들. 루시 수술하고 배의 수술자국 긁을까봐 "다이소"에서 팔목토시 사서
배에 둘러주었다.
사용자 삽입 이미지사용자 삽입 이미지사용자 삽입 이미지
사용자 삽입 이미지사용자 삽입 이미지

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 11:09 2011/04/01 11:09
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6026

행동이 감정을 따르는 것 같지만 행동과 감정은 병행한다.
따라서 우리는 의지의 직접적인 통제하에 있는
행동을 조정함으로써 의지의 직접적인 통제하에 있지 않은
감정을 간접적으로 조정할 수 있다.
만일 유쾌한 상태가 아니더라도 기분을 유쾌하게 만드는 최상의 방법은
유쾌한 마음을 갖고 이미 유쾌해진 것처럼 행동하고 말하는 것이다.
(Action seems to follow feeling, but really action and feeling go together;
and by regulating the action, which is under the more direct control of the will,
we can indirectly regulate the feeling,
which is not. Thus the sovereign voluntary path to cheerfulness,
if our cheerfulness be lost, is to sit up cheerfully and to act and speak as
if cheerfulness were already there.)

촌철활인:한치의 혀로 사람을 살린다
행복해서 웃는 것이 아니라 웃기 때문에 행복해진다고 합니다.
생각이 행동을 바꾸고, 행동이 습관을 바꾸고,
습관이 운명을 바꾼다는 얘기는 널리 알려져 있습니다.
그러나 경우에 따라서는 행동이 습관과 생각을 바꿀 수도 있습니다.
힘들고 지칠 때 일부러 유쾌하게 크게 웃어보고,
어려울수록 재미있게 일하는 지혜가 필요합니다.
We don’t laugh because we’re happy, we’re happy because we laugh.
It is widely known that thoughts will change our actions,
actions will change our habits, and habits will change our destiny.
However, in some situations our actions can change our thoughts and habits.
We need to find the strength to force a cheerful disposition,
and the wisdom to find joy during harsh times.
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 09:15 2011/04/01 09:15
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6025

꾸준함

누구나 시행착오는 불가피하다.
일을 하다가 실패를 할 수도 있다.
그러나 실패와 시행착오를 하더라도
갈지자로 좌충우돌해서는 안 된다. 어려움이
있더라도 일관성 있게 밀어붙이는 힘이 중요하다.
무슨 일을 하든지 중간에 포기하는 일 없이
될 때까지 끝까지 해라. 세상에 꾸준함을
이길 수 있는 것은 없다.


- 문용식의《꾸준함을 이길 그 어떤 재주도 없다》중에서 -


* 어느 한 순간
반짝 빛나기는 쉽습니다.
그러나 꾸준히 오래 빛나기는 어렵습니다.
더구나 처음부터 끝까지 빛나기는 더 어렵습니다.
그래서 변함없이, 흔들림없이, 꾸준히 빛나는 사람이
소중한 것입니다. 평생 믿고 갈 수 있으니까요.
일도 사랑도 명상도 마찬가지입니다.
꾸준함이 가장 좋습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2011/04/01 09:13 2011/04/01 09:13
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/6024


블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2011/04   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Statistics Graph

Site Stats

Total hits:
186667
Today:
136
Yesterday:
789