Share
Embed
NProxy——A Sharp Weapon for UI Developers
An introduction to NProxy(A cross-platform web proxy specialised in file replacing).
If you are seeking an alternative for Fiddler in Mac and Linux, NProxy will be your best choice. It is more powerful than Fiddler in the cases of file replacing.
Goddy Zhao
September 01, 2012
Transcript
111 slides
-
Abstract Why NProxy What NProxy can do How to use
NProxy Bonus Tool for SF Projects -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
deploy coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css deploy coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css deploy deploy coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css deploy deploy coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css deploy deploy coding coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css ant deploy-css deploy deploy coding coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css ant deploy-css deploy deploy coding coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css ant deploy-css fail deploy deploy coding coding coding -
Why NProxy Workflow of UI development Development Deployment ant deploy-js
ant deploy-css ant deploy-css fail deploy deploy coding coding coding blocked blocked blocked -
Why NProxy Production Environment Code in Remote Server JS files
are compressed JS files are merged -
Why NProxy Hard to debug issues in production Production Environment
Code in Remote Server JS files are compressed JS files are merged -
Why NProxy Support Mac, Linux and Windows(A) Requirements Support single
file replacing (B) -
Why NProxy Support Mac, Linux and Windows(A) Requirements Support single
file replacing (B) Support merged file replacing (C) -
Why NProxy Support Mac, Linux and Windows(A) Requirements Support single
file replacing (B) Support merged file replacing (C) Support directory mapping (D) -
Why NProxy Support Mac, Linux and Windows(A) Requirements Support single
file replacing (B) Support merged file replacing (C) Support directory mapping (D) Support HTTPS (E) -
Why NProxy Support Mac, Linux and Windows(A) Requirements Support single
file replacing (B) Support merged file replacing (C) Support directory mapping (D) Support HTTPS (E) -
Why NProxy Support Mac, Linux and Windows(A) Support single file
replacing (B) Support merged file replacing (C) Support directory mapping (D) Support HTTPS (E) Existing Proxies -
Why NProxy Support Mac, Linux and Windows(A) Support single file
replacing (B) Support merged file replacing (C) Support directory mapping (D) Support HTTPS (E) Existing Proxies Fiddler Charles Rythem TinyProx y A ✘ ✔ ✘ ✘ B ✔ ✔ ✔ ✔ C ✘ ✘ ✘ ✘ D ✘ ✘ ✔ ✘ E ✔ ✔ ✘ ✔ -
Why NProxy Support Mac, Linux and Windows(A) Support single file
replacing (B) Support merged file replacing (C) Support directory mapping (D) Support HTTPS (E) Existing Proxies Fiddler Charles Rythem TinyProx y A ✘ ✔ ✘ ✘ B ✔ ✔ ✔ ✔ C ✘ ✘ ✘ ✘ D ✘ ✘ ✔ ✘ E ✔ ✔ ✘ ✔ NProxy ✔ ✔ ✔ ✔ ✔ -
What NProxy can do Support Mac, Linux and Windows(A) Support
single file replacing (B) Support merged file replacing (C) Support directory mapping (D) Support HTTPS (E) -
How to Use NProxy 1. install node (>=0.8.x) 2. npm
install -g nproxy -
How to Use NProxy 1. install node (>=0.8.x) 2. npm
install -g nproxy 3. prepare a rule file -
How to Use NProxy 1. install node (>=0.8.x) 2. npm
install -g nproxy 4. nproxy -l rulefilename.js 3. prepare a rule file -
How to Use NProxy 1. install node (>=0.8.x) 2. npm
install -g nproxy 4. nproxy -l rulefilename.js 3. prepare a rule file 5. set nproxy as browser’s proxy -
How to Use NProxy 1. install node (>=0.8.x) 2. npm
install -g nproxy 4. nproxy -l rulefilename.js 3. prepare a rule file 5. set nproxy as browser’s proxy -
How to Use NProxy Format of rule file module.exports =
[ { pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ }, { pattern: ‘homepageTile.js’, responder: ‘/Users/goddyzhao/homepage.js’ } ]; -
How to Use NProxy Format of rule file module.exports =
[ { pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ }, { pattern: ‘homepageTile.js’, responder: ‘/Users/goddyzhao/homepage.js’ } ]; { } -
How to Use NProxy Format of rule file module.exports =
[ { pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ }, { pattern: ‘homepageTile.js’, responder: ‘/Users/goddyzhao/homepage.js’ } ]; pattern: ‘homepage.js’, URL Pattern { } -
How to Use NProxy Format of rule file module.exports =
[ { pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ }, { pattern: ‘homepageTile.js’, responder: ‘/Users/goddyzhao/homepage.js’ } ]; responder: ‘/Users/goddyzhao/homepage.js’ File Path(Local/Web) { } -
How to Use NProxy Format of rule file module.exports =
[ { pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ }, { pattern: ‘homepageTile.js’, responder: ‘/Users/goddyzhao/homepage.js’ } ]; name.js responder: ‘/Users/goddyzhao/homepage.js’ File Path(Local/Web) { } -
How to Use NProxy Replace single file with local one
https:/ /qacand.successfactors.com/ ui/js/homepage.js -
How to Use NProxy Replace single file with local one
https:/ /qacand.successfactors.com/ ui/js/homepage.js request -
How to Use NProxy Replace single file with local one
https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server request -
How to Use NProxy Replace single file with local one
https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server request response .js -
How to Use NProxy Replace single file with local one
https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server request response .js NProxy -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server request response .js NProxy -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy Local File System -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy Local File System .js -
How to Use NProxy Replace single file with local one
{ pattern: ‘homepage.js’, responder: ‘/Users/goddyzhao/homepage.js’ } https:/ /qacand.successfactors.com/ ui/js/homepage.js Qacand Server NProxy Local File System .js -
How to Use NProxy Replace merged file with source files
https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js -
How to Use NProxy Replace merged file with source files
https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js request -
How to Use NProxy Replace merged file with source files
https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server request -
How to Use NProxy Replace merged file with source files
https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server request response .js -
How to Use NProxy Replace merged file with source files
https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server request response .js NProxy -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server request response .js NProxy -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy Local File System -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy Local File System .js .js .js -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy Local File System .js .js .js -
How to Use NProxy Replace merged file with source files
{ pattern: ‘homepageTileFramework.js’, responder: { dir: ‘/Users/goddyzhao/’, src: [‘hmpTile.js’, ‘hmpUtil.js’, ‘...’] } } https:/ /qacand.successfactors.com/ ui/js/homepageTileFramework.js Qacand Server NProxy Local File System .js .js .js .js merged -
How to Use NProxy Directory Mapping https:/ /..../ui/js/homepage.js Qacand Server
request response .js https:/ /..../ui/js/a_dev-snapshot.js -
How to Use NProxy Directory Mapping https:/ /..../ui/js/homepage.js Qacand Server
request response .js NProxy https:/ /..../ui/js/a_dev-snapshot.js -
How to Use NProxy Directory Mapping { pattern: ‘/ui/js/’, responder:
‘/Users/goddyzhao/js/’ } https:/ /..../ui/js/homepage.js Qacand Server request response .js NProxy https:/ /..../ui/js/a_dev-snapshot.js -
How to Use NProxy Directory Mapping { pattern: ‘/ui/js/’, responder:
‘/Users/goddyzhao/js/’ } https:/ /..../ui/js/homepage.js Qacand Server request response .js NProxy https:/ /..../ui/js/a_dev-snapshot.js -
How to Use NProxy Directory Mapping { pattern: ‘/ui/js/’, responder:
‘/Users/goddyzhao/js/’ } https:/ /..../ui/js/homepage.js Qacand Server request response .js NProxy https:/ /..../ui/js/a_dev-snapshot.js -
How to Use NProxy Directory Mapping { pattern: ‘/ui/js/’, responder:
‘/Users/goddyzhao/js/’ } https:/ /..../ui/js/homepage.js Qacand Server request response .js NProxy Local File System https:/ /..../ui/js/a_dev-snapshot.js matching -
How to Use NProxy Directory Mapping { pattern: ‘/ui/js/’, responder:
‘/Users/goddyzhao/js/’ } https:/ /..../ui/js/homepage.js Qacand Server request response .js NProxy Local File System .js https:/ /..../ui/js/a_dev-snapshot.js matching -
How to Use NProxy Directory Mapping { pattern: ‘/ui/js/’, responder:
‘/Users/goddyzhao/js/’ } https:/ /..../ui/js/homepage.js Qacand Server request response .js NProxy Local File System .js https:/ /..../ui/js/a_dev-snapshot.js matching -
Bonus tool for Sf projects XML configuration file for file
merging <groupdefinition> <groups> <group id=”homepageTileFramework” type=”global”> <resource uri=”/ui/homepage/js/common/HTMUtils.js” /> <resource uri=”/ui/homepage/js/tileFramwork/hmpAnimUtil.js” /> <resource uri=”/ui/homepage/js/tileFramework/ hmpGenericTileDAO.js” /> <resource uri=”/ui/homepage/js/dropMenu/ hmpAbstractMenuModel.js” /> .... </group> ... </groups> </groupdefinition> -
How to quickly convert it to nproxy rule file Bonus
tool for Sf projects -
Bonus tool for Sf projects module.exports = [ { pattern:
‘homepageTileFramework’, responder: { dir: ‘/Users/goddyzhao/webapps’, src: [ ‘/ui/homepage/js/common/HTMUtils.js’, ‘/ui/homepage/js/tileFramwork/hmpAnimUtil.js’, ‘/ui/homepage/js/tileFramework/hmpGenericTileDAO.js’, ‘...’ ] } } ]; -
Bonus tool for Sf projects module.exports = [ { pattern:
‘homepageTileFramework’, responder: { dir: ‘/Users/goddyzhao/webapps’, src: [ ‘/ui/homepage/js/common/HTMUtils.js’, ‘/ui/homepage/js/tileFramwork/hmpAnimUtil.js’, ‘/ui/homepage/js/tileFramework/hmpGenericTileDAO.js’, ‘...’ ] } } ]; -d -
Why NProxy Workflow of UI development with NProxy Development Deployment
Setup nproxy Browser -
Why NProxy Workflow of UI development with NProxy Development Deployment
Setup nproxy coding Browser -
Why NProxy Workflow of UI development with NProxy Development Deployment
Finish Coding Setup nproxy coding Browser -
Why NProxy Workflow of UI development with NProxy Development Deployment
Finish Coding Setup nproxy deploy coding Browser