State Machine libray

상태관리

프로그램을 만들다 보면 상태가 중요한 요소일 경우가 많은데
회원의 상태, 프롯스의 상태
상태를 변경하기 위한 동작들
기존 상태 메모리에 로드, 디스크 저장 등등

별도로 관리하지 않고 디비에서 가져와서 한개씩 처리하면서 트랜잭션 거는거도 가능하지만
실수가 잦다

그래서 하나 만들어볼까 하다가 찾아보니 잔뜩 나와서 일단 정리

REF

  • https://statecharts.github.io/
  • https://kentcdodds.com/blog/implementing-a-simple-state-machine-library-in-javascript
  • https://github.com/davidkpiano/xstate
  • https://github.com/Ankzz/easyfsm/
  • https://github.com/hekailiang/squirrel

2014 Web UI(JS,CSS) 프레임워크Framework & 라이브러리Library

최근 트렌드로 제시되고 있는놈들하고 기존 사용되던놈들…
여기없거나 설명이 매우 적은것들은 아주최신이라 서비스로 쓰기 좀 안좋을정도거나
오래되서 사용하지않는것들일 가능성이 높음.

PrimeFaces
게시판이나 이런거 등등 다양한 UI제공

Homepage

ICEFaces
PRIME이랑 비슷한것?
http://www.icesoft.org/java/projects/ICEfaces/overview.jsf

RichFaces
Prime이랑 비슷한것역시..
http://www.jboss.org/richfaces

jQuery thermeroller
아코디언모양 메뉴
http://jqueryui.com/themeroller/

960-Grid-System
twitter 직원이 만든듯 싶다. 포토샵이랑 fireworkd에 설치해서 쓰는 템플릿?
대강 이렇게 만들어놓은건 파이어웍스에서 CSS를 자동생성해주는 기능이 아닐까 하는 느낌
http://code.tutsplus.com/tutorials/which-css-grid-framework-should-you-use-for-web-design–net-25
http://960.gs/

AngularJS
구글에서 나온 JS프레임워크
http://angularjs.org/
지원사이트 : http://angular-ui.github.io/
모듈모음 : http://ngmodules.org/
예제 : https://github.com/angular/angular.js/wiki/JsFiddle-Examples
Bootstrap연동 : http://angular-ui.github.io/
Tstacular JS 테스팅프레임웍 : http://testacular.github.io/
AngularJS 팁 : http://deansofer.com/posts/view/14/AngularJs-Tips-and-Tricks-UPDATED
한국유저그룹 : http://angularjs.co.kr/
페이스북그룹 : https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Fgroups%2FKorea.AngularJS.User.Group%2F

Backbone.js
https://github.com/jeromegn/Backbone.localStorage
언더스코어 : http://underscorejs.org/
튜토리얼 : http://backbonetutorials.com/
관계형모델 : http://backbonerelational.org/
페이징 : https://github.com/backbone-paginator/backbone-pageable
폼생성 : https://github.com/powmedia/backbone-forms
Mustache템플릿엔진 : http://mustache.github.io/
Bootstrap연동GRID : http://direct-fuel-injection.github.io/bbGrid/
Backbone.js기반 프로젝트 시드 : https://github.com/backbone-boilerplate/backbone-boilerplate
Backbone.js기반 MVC프레임웍 : http://chaplinjs.org/

Prototype

jQuery
다른것들 쓰는데 jQuery만 빼놓을수 없어서…
UI : https://jqueryui.com/
kendoui라던가 뭐 이래저래 jquery기반으로 만들어진 유료라이브러리도 꽤 된다. 역사도 오래되서 버그도 많이없고… 또 익숙하고. SI에 특히 유용.(유지보수관점)

Bootstrap
요즘 거의 대세인 웹디자인 템플릿
http://getbootstrap.com/
템플릿 : https://wrapbootstrap.com/
예제제작도구 : http://bootsnipp.com/
한글사이트 : http://webdesigncss3.com/bootstrap/
적용사례 : http://builtwithbootstrap.com/
테마 : https://wrapbootstrap.com/
테마 : http://www.templatemonster.com/properties/features/bootstrap-templates/
테마 : http://themeforest.net/search?term=bootstrap
테마제작도구 : http://stylebootstrap.info/

blueprint
CSS프레임워크
http://blueprintcss.org/

Foundation
http://foundation.zurb.com

Skeleton
http://getskeleton.com

HTML KickStart
http://99lime.com

HTML5 BoilerPlate
http://html5boilerplate.com

Initializr
http://www.initializr.com

GLYPHICONS
아이콘 사이트.유료무료
http://glyphicons.com/
http://glyphicons.getbootstrap.com/

Python ConfigParser .properties .ini .cfg와 같은 설정파일 읽는 라이브러리

파이썬에서는 설정파일을 쉽게 읽게 해 주는 라이브러리가 있다.

이런식으로…

import ConfigParser

config = ConfigParser.ConfigParser()

샘플 코드는 여기 잘 나와있다.

http://docs.python.org/library/configparser.html

이 포스팅에는 기초적인 사용법만 써놓는다.

 

설정파일(server_config.cfg)

[My Section]
foodir: %(dir)s/whatever
dir=frob
long: this value continues
   in the next line
코드
cfg = ConfigParser.RawConfigParser()
cfg.read('server_config.cfg')

print config.get('Section1', 'foo', 0) # -> "Python is fun!"
print config.get('Section1', 'foo', 1) # -> "%(bar)s is %(baz)s!"

이걸로 끝. 파이썬 참 쉽다.

 

주의할점…

이 코드는 버그없이 잘 돌아간다. 이게 돌아가지 않는다면 잘못된것은 나! 라는 것을 잊지말자

보통 다음의 상황중의 하나일 것이다 1번은 내가 겪은 상황..

상황1. server.ini.txt 와 같은 형태로 저장되서 mac finder상에서는 .txt가 보이지 않았다. – 윈도우에서도 비슷한 일을 겪을 수 있을 것이라는 생각이 든다.

상황2. 그냥 파일명을 잘못쳤다.

상황3. 윈도우에서 c:\game\play 와 같이 잘못된 경로를 표시했다. 윈도우에서 슬러시 표기가 먹히는지 모르겠지만 역슬러시는 더블역슬러시로 해야 될 것이다. 내 오류 검색하다가 같이 발견한 오류