반응형

[출처]

http://www.imaso.co.kr/?doc=bbs/gnuboard.php&bo_table=article&wr_id=41825
http://www.imaso.co.kr/?doc=bbs/gnuboard.php&bo_table=article&wr_id=42062

 

[마소연재] 페이스북 웹앱 만들기

 

1회 : 2013.01 | 페이스북 앱 기본 설정

2회 : 2013.02 | 페이스북 PHP/자바스클비트 SDK 사용

3회 : 2013.03 | 페이스북 웹앱 완성 및 광고 설정

 

 

1.페이스북 개발자 페이지에 접속 - http://developers.facebook.com/

 

2.페이스북 개발자 등록

  : 페이지 상단의 "APP" 메뉴를 선택하면 등록된 정보를 볼 수 있다.

 

3.페이스북 앱 생성

  : "새 앱 만들기" 버튼을 선택하고, "계속하기"를 누르면 헤로쿠(Heroku)와 관련된 기본적인 설정 페이지가

      보인다. 헤로쿠를 사용하지 않느다고 선택하면 바로 앱설정 페이지로 넘어간다.

     헤로쿠 호스팅 설정 페이지에서는 서버사이드 개발에 사용할 언어 설정과 이메일 주소를 입력한다.

     서버사이드 개발언어로는 PHP를 사용하고, 이메일 주소에는 사용 중인 헤로쿠 계정이있다면

     헤로쿠 계정을 적고 계정이 없는 경우에는 헤로쿠에서 사용할 이메일 주소를 입력하면

     해당 이메일주소로 회원가입 메일이 온다.

 

     * 헤로쿠 : PaaS기반의 클라우드 서비스 플랫폼이다. 별도 호스팅 절차없이 페이스북 앱을

                     PHP,Ruby,Node.js,Python으로 개발할 수 있다.

 

# 새 앱 만들기 옵션 

 App Name

 3~32 글자 제한이며 외부에 노출될 때 보이는 앱의 제목이다.

 App Namespace

 앱의고유 ID로 앱으로 접속 시 고유 URL 주소로 사용된다.

선택사항이지만 캔버스 앱에서 URL로 쓰이므로 처음부터 설정하는 쪽이 편하다.

 Locale

 앱에서 사용할 언어를 선택한다.

특정 조건에서는 보이지 않기도 하지만 앱 설정에서 다시 설정할 수 있으니

걱정하지 말자.

 Web Hosting

 웹호스팅 서비스 헤로쿠를 사용할 것인지 묻는 항목이다.

헤로쿠를 사용하면 기본적으로 URL 설정과 SSL을 바로 제공하므로 서버 셋팅에 큰 시간을 들일 필요가 없다.

 

======================================================================================================

1.페이지 생성

  : 페이지 생성 주소 - http://www.facebook.com/pages/create.php

    * 페이지 탭 앱 등록방법 : http://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL

 

헤로쿠를 사용하면 페이스북 웹앱 개발이 빠른 이유 

  •  페이스북 앱에서 헤로쿠 연동을 처음부터 제공해주기 때문에 서버 구성에 드는 시간이 최소화된다.
  • 페이스북 앱에서 권장하는 SSL 설정을 바로 제공해죽 때문에 많은 비용과 시가니 소모되는 SSL 설정 작업을 적용 시간과 비용으로 구축 할 수 있다.
  • 페이스북 앱을 만드는 데 필요한 PHP, javascript 등의 좋은 예제 코드를 기본 페이지를 통해 제공한다. 해당 코드들은 향후 페이스북 앱 개발에 있어 많은 도움이 된다.

 

* 헤로쿠 개발 구축 환경

헤로쿠 툴밸트를 사용해 계정 로그인용 인증키를 받고, 이를 사용해 소스를 관리하고 배포할 수 있다. (윈도우용 헤로쿠 인스톨러에는 Git가 포함돼있다. )

 기존 Git을 설치해 사용하고 있었다면 Git 설치 옵션을 제히하고 설치해야 한다.

 만약 Git를 다시 설치한다면 기존의 모든 설정이 초기화되고 SSH키값이 모두 사라진다.

 

 헤로쿠 툴밸트를 모두 설치했다면 커맨드라인에 'herokulogin'을 입력하고 헤로쿠 계정으로 로그인할 수 있다.

그 후 Git를 통해 소스를 다운로드 할 수 있다.

설정이 모두 정상적으로 이루어 졌는지 확인하기 위해 다운로드한 소스중에서 index.php 파일을 수정해보자.

바꾸고 Commit후에 Push하면 페이스북 앱에 바로 적용된다.

Git의  master branch의 최신 데이터로 앱을 배포한다는 것을 알 수 있다.

 

 

* 헤로쿠 개발환경 개선

 로컬PC에서 웹서버를 설치하고 PHP를 구동하자 - www.apmsetup.com

 로컬서버의 루트폴더에 Git로 헤로쿠에서 받아온 파일을 넣는다.

 http://localhost  로  구동시 설정 문제가 있다.

 

1. 페이스북 PHP SDK 사용에 필요한 '/sdk' 폴더가 없다.

   - Facebook SDK for PHP를 페이스북 개발자 페이지에서 다운로드하고,

      로컬 테스트 서버 환경의 웹 루트 하우에 '/sdk/src/facebook.php' 가 위치하도록 설치한다.

 

2. cURL 기능이 필요하다.

   - PHP에 cURL 기능이 있는지 phpinfo()로 확인하고 없으면 설치한다.

 

3.App ID, App Secret Code가 없다.

   - /Appinfo.php 파일에서는 App ID와 App Secret Code의 설정에 getenv() 함수를 사용하고 있다.

     이와 같은 헤로쿠 서버의 정보는 http://phpinfo.herokuapp.com 을 통해 확인할 수 있다.

 

로컬 테스트 서버 환경에 설치된 아파치에도 헤로쿠와 동일하게 App ID와 App Secret Code를 설정하기 위해 httpd.conf 파일 아래에 다음의 텍스트를 추가한다.

 

<VirtualHost *:80>

DocumentRoot (설치경로)

ServerName 127.0.0.1

SetEnv FACEBOOK_APP_ID (APP_ID)

SetEnv FACEBOOK_SECRET (SECRET)

</VirtualHost>

 

이렇게 마치면 로컬 서버 환경에서도 헤로쿠와 동일한 페이지가 출력된다. 하지만 페이스북앱의 도메인 퍼미션 때문에 로그인 버튼이 동작하지 않는다. 이를 해결하기 위해서는 페이스북 앱 설정 페이지에 있는 'Website with facebook login'에 http://127.0.0.1 을 추가해 로컬 테스트 서버 환경에 접근 권한을 주면 된다.

 

마지막으로 로컬 서버에서 개발한 것을 Git에 커밋하고 Push할 때 '/sdk' 폴더를 포함시키지 않도록 주의해야 한다. 헤로쿠 서버의 '/sdk' 폴더 내의 내용을 최신 페이스북 PHP SDK 로 관리해주기 때문이다. 또한 로컬 환경에서 동작했던 값이 그래도 헤로쿠 환경에 적용될 수 있도록 버전(PHP의 경우 'phpinfo()'한수로 확인 가능)관리에 신경 쓰자.

 

** 마소지 2013.01 참고 **

 

 

* 페이스북 자바스크립트 SDK

 : http://developers.facebook.com/docs/reference/javascript/

 

* 페이스북 Dialog

 : http://developers.facebook.com/docs/reference/dialogs/

 

* 페이스북 FQL(Facebook Query Language)

 : http://developers.facebook.com/docs/reference/fql/

 

* 페이스북 그래프 API

 : http://developers.facebook.com/docs/reference/api/

 

* Facebook SDK for PHP

 : http://developers.facebook.com/docs/reference/php/

 

 

 

 

 

 

 

 

 

 

 

 

반응형
반응형

Beginner HTML5, JavaScript, jQuery, Backbone, and CSS3 Resources

http://www.elijahmanor.com/2013/01/beginner-html5-javascript-jquery.html

 

html5 Resources

Javascript Resources

Jquery  Resources

 

Backbone.js  Resources

CSS3  Resources

Feature detection   Resources

Responsive web design  Resources

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형
반응형

angular.js

 

HTML enhanced for web apps!

 

jquery보다 훨씬 동적이면서 구문에 자유로운 구현이 가능하다.

확장성이 높아서 웹앱을 제작하는데 있어서 동적구현이 가능하다.

 

 

AngularJS 시작하세요.
http://angularjs.org


github : https://github.com/angular/angular.js

Tutorial : http://docs.angularjs.org/tutorial/

Download : http://code.angularjs.org/

Video : http://www.youtube.com/user/angularjs

 

AngularJS lets you write client-side web applications as if you had a smarter browser. It lets you use good old HTML (or HAML, Jade and friends!) as your template language and lets you extend HTML’s syntax to express your application’s components clearly and succinctly. It automatically synchronizes data from your UI (view) with your JavaScript objects (model) through 2-way data binding. To help you structure your application better and make it easy to test, AngularJS teaches the browser how to do dependency injection and inversion of control. Oh yeah and it also helps with server-side communication, taming async callbacks with promises and deferreds; and make client-side navigation and deeplinking with hashbang urls or HTML5 pushState a piece of cake. The best of all: it makes development fun!

 

 

 

반응형
반응형

http://www.coronalabs.com
자바스크립트와 유사한 루아(LuaScript)라는 언어를 사용하는 모바일 최적화된 플랫폼입니다. 물리엔진이 강력해서 앵그리버드를 30분만에 만들죠.

- Adobe AIR로 앱 만들기
http://facebook.com/groups/airapp

- CoronaSDK로 앱 만들기
http://facebook.com/groups/coronasdk

[출처] 자바스크립트 개발자를 유혹하는 CoronaSDK를 아시나요? (웹앱을 만드는 사람들의 모임 (HTML5, CSS3,webapp,jQuery,웹앱)) |작성자 원강민

 

================================================================================================

CoronaSDK 2012.971

SDK Download : https://developer.coronalabs.com/downloads/coronasdk

 

 

Corona SDK on Windows Build 2012.971

CoronaSDK-2012.971.msi (73.4 MB)
md5: cb6637d45a7a142f8c8345fd86dbbbae

Includes Corona SDK Simulator, sample apps, and free 30 day trial versions of Corona Project Manager, Kwik, and Spriteloq.

Please note: Due to Apple's restrictions, you cannot build for iOS on Windows.

System Requirements:
Windows XP or later, 1 GHZ processor

Device support:
Android OS 2.2 or greater (ARMv7). Corona-built apps will not install on Android ARMv6 devices.

================================================================

 

 

Corona SDK on Mac OS X Build 2012.971

CoronaSDK-2012.971.dmg (85.9 MB)
md5: 11a974b0c1723e42f78a68863724fdf8

Includes Corona SDK Simulator, sample apps, and free 30 day trial versions of Corona Project Manager, Kwik, and Spriteloq.

System Requirements:
Mac OS® X 10.7 or later, Intel Mac

Device support:
iOS 4.5 or greater (includes support for iOS 5 and iOS 6). Android OS 2.2 or greater (ARMv7). Corona-built apps will not install on Android ARMv6 devices.

 

 

 

 

반응형
반응형

* input 이 hidden 이거나 포커스 없이 value()가 변경되는 것을 체크할때 사용.

.change() 로 확인안될때.

  
  survey('input[name=hidden 객체]', function(){ 
        console.log('changed');
  }); 
  
 

        function survey(selector, callback) {
            var input = $(selector);
            var oldvalue = input.val();
            setInterval(function(){
               if (input.val()!=oldvalue){
                   oldvalue = input.val();
                   callback();
               }
            }, 100);
         }

 

 

 

http://stackoverflow.com/questions/12580761/hidden-input-change-event

반응형
반응형

http://angularjs.org/

 

Are you a JS ninja? Would you like to become superhero, fight evil, and change the way web apps are written? Awesome, because we are hiring!

HTML enhanced for web apps!

 

Why AngularJS?

HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.

Alternatives

Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views.

Extensibility

AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how.

 

The Basics 

Add Some Control 

 

 

 

반응형
반응형

http://visionmedia.github.com/uikit/

Modern UI components for the modern web

 

UIKit is a small collection of flexible, decoupled jQuery JavaScript components for the modern web. With an emphasis on structure-only styling it's easy to style UIKit to match your application, no preprocessor variables, just raw CSS structure! As a result most of the styling you see in this document is for demonstration only.

반응형
반응형

http://fabien-d.github.com/alertify.js/

alertify.js – An unobtrusive customizable JavaScript notification system

Dated Added → December 4, 2012Categories → Javascript

Alertify is a fully customizable alert, confirm and prompt dialogs JavaScript notification system.
alertifyjs -an unobtrusive customizable JavaScript notification system

 

 

반응형

+ Recent posts