HTTP Cache is a browser Cache. HTTP is typically used for distributed information systems, where performance can be improved by the use of response caches. This kind of cache used for reduce request times and bandwidth. more info. Let’s talk about its principle. The Browser start a request. When request reach Web Server. the web [...]
Posts under ‘Weekly Review’
development tips on Titanium
After releasing our first iPhone app, I just learned a lot about using Titanium SDK. Today I want to share some valuable development tips, which are mostly gathered from Titanium developer’s forum. 1. Remember that the device is not as speedy as the simulator. 2. When you need to use a webView, try to communicate [...]
Dynamic add class method in (class << self; self; end)
1 @person = Person.new As you know, @person is a instance object of Person, in the other words @personal.class is Person. but do you know who is Person.class? sure, it’s Class, so we can say Person is a Class’s “instance object”. Next, we add some class methods to Person by difference ways. 1234567891011121314151617181920212223242526class Person [...]
How to analyze and forecast?
What we can get from history data? and how we can get it? These are two question when I face to the LPD function. and In trainer side , there are many statistics data. can we get something from these data? The answer is sure, we can get , but how? These two data I [...]
Apple iPhone app : Debug and Release through Titanium
Once people develop an iPhone App using Titanium1.4, they must be very happy when the App is running on iPhone simulator. They feel great until they decide to debug their app on their devices or even release their app to AppleAppStore. This happens specially to these who firstly do this. Why? There are many reasons [...]
rails small tips
1. flash and flash.now flash in rails used to pass messages.it is use session do this. 123456789def create if User.authorize(params[:login], params[:password]) flash[:notice] = "login success" redirect_to target_path else flash[:error] = "login fail" render :new end end flash[:notice]. it effect after redirect_to. in this example [...]
thought of DB
last weeks we discussed how to storage data. When I use titanium, I find DB API can not satisfy me. my view about client DB(sqlite): 1st. can controlled by server. 2nd. struct should suit our data(from server) 3rd. DB struct Operating can migrate and revert. 4th. DB operate should comfortable. Hope js can write like [...]
Handle Exception
In our system, we handle exception by default way, it always return 500.html or 404.html page when some errors occurred, but we can custom it. 12345678910111213class ApplicationController < ActionController::Base private def local_request? false end def rescue_action(exception) if [...]
Story Garden Meetup
时间:2010年7月24日晚上,18: 30入场,19:00开始 地点:奇遇花园咖啡馆(问路电话010-88320741) 地址:西直门北展北街9号华远企业号(华远地产)D座一层(地图) 演讲题目: Ruby On Rails : How To Disassemble One Monster App Into An Ecosystem Of 30 [点击下载演讲文档PDF] 内容简介: 1. Why to split single applications into many? 2. How to keep consistent user experience? 3. How do applications share data? 4. Best practices for higher productivity. 5. How to split and measure [...]
Titanium : DB Synchronization
Header Notes: 1. Static data should be released with app, just don’t do db synchronization. 2. Just embed sync background when ppl looking at some instructions/tips etc. 3. Don’t update db all the time. App Start: app.js 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121// Localization libs Ti.include(’l10n/l10n.js’); Ti.include(’l10n/l10n_dialog.js’); Ti.include(’l10n/l10n_format.js’); var db = Titanium.Database.install(’eq31formulas.db’, ‘eq31formulas’); // Ti.include(‘content/tab_formula.js’) // this sets the background [...]