betweenGo

Bootstrapping is the Rage

by on Jan.24, 2011, under Miscellaneous

Web startups boot strapping themselves are all the rage.  Every few weeks someone approaches me with a new idea.  The implementation plans for the venture are almost always identical.

  • web application
  • open source framework, usually Ruby on Rails, sometimes PHP
  • free database, almost always MySQL
  • cloud hosting
  • small group of guys, typically people who have made money at a previous venture
  • no salaries, just equity

Inspirations for these companies are places such 37signals, Wufoo, Plentyoffish and World of Goo.

I enjoy hearing the ideas and almost joined one venture.  But in the end none have been compelling enough for me to risk 6 to 12 months of income.  Hopefully I’ll think of one on my own. :-)

Share
Leave a Comment :, , , more...

Tweets for November, December 2010

by on Dec.20, 2010, under Miscellaneous

ATG Development

  • For JBoss ATG standalone applications the CLASSPATH is set in ATG.ear/atg_bootstrap_ejb.jar/META-INF/MANIFEST.MF. #
  • When setting up your ATG module’s MANIFEST.MF the ATG-Required property should list the modules in the order you would for the CLASSPATH. #
  • Turning on Secure for ATG Applications « betweenGo. It’s pretty simple, enable the ProtocolSwitchServlet. http://bit.ly/a7DHen #
  • Load ATG Order « betweenGo. Programmatically do this using the OrderManager. http://bit.ly/load-atg-order #
  • ATG Confirm Password User Bug in ProfileFormHandler « betweenGo. Talking to ATG Support about it. http://bit.ly/atg-confirm-pwd-bug #
  • ATG Community: ATG REST Web Services Technical Training Presentation: http://bit.ly/f5ZfhA Pretty cool, useful for mobile applications. #
  • Turning On Debug in JBoss « betweenGo http://bit.ly/ePcUNV JBoss makes it easy to attach a debugger like Eclipse for happy bug fixing. # 

ATG Buys Oracle

  • Oracle buys ATG for $1 billion | silicon.com. Why didn’t this happen when I worked there? :-) http://bit.ly/9Dh02a #
  • ATG Swept Up in Oracle Spending Spree. ATG customers nervous. Oracle has bad rep supporting its acquisitions’ customers http://bit.ly/dgUgWT #
  • ATG’ s official page about its pending acquisition by Oracle. Includes letters from management and an FAQ. http://bit.ly/dkMuMD #

VNC

  • I tried TigerVNC, @TightVNC, @UltraVNC for connecting to my iMac from my Windows XP laptop. TigerVNC seems the fastest http://bit.ly/9EGUS0 #
  • Is UltraVNC a virus/adware/malware/spyware? I kept getting a dial-up connection popping up until I removed UltraVNC. #

Miscellaneous

  • WordPress › WP-reCAPTCHA « WordPress Plugins. Forced to install because of spam that gets past Akismet. http://bit.ly/dCChoh #
  • Developing and Monetizing a Niche Website » My Money Blog http://bit.ly/fEQizu Big Adsense ads, sell products, Amazon affiliates, direct ads #
  • The JCP Is Dead – Jim’s Ramblings "Java Community Process" http://bit.ly/fCkISY Apache leaves Java Community Process. Bad bad bad news. #
  • Why ‘Anonymous’ failed to take down Amazon over WikiLeaks – Dec. 9, 2010 http://bit.ly/i8CE25 #
  • I just got a $5 credit for movies and TV shows @amazonvideo. Click http://amzn.to/hh8gTP to get yours. #get5 #
Share
Leave a Comment more...

Turning On Debug in JBoss

by on Dec.19, 2010, under JBoss

Prius Power ButtonThere are probably many ways of turning debug on in JBoss.

In windows the way I do it is by uncommenting the line in<JBoss>/bin/run.bat that starts with:

rem set JAVA_OPTS=-Xdebug


Uncommenting in DOS bat files is simply done by removing the rem command:

set JAVA_OPTS=-Xdebug


I created aliases for turning debug on and off. I use a script which simply replaces one string with another.

alias debugon='changeString.sh "^rem set JAVA_OPTS=-Xdebug" "set JAVA_OPTS=-Xdebug" ${JBOSS}/bin/run.bat && chmod 755 ${JBOSS}/bin/run.bat && unix2dos ${JBOSS}/bin/run.bat'
alias debugoff='changeString.sh "^set JAVA_OPTS=-Xdebug" "rem set JAVA_OPTS=-Xdebug" ${JBOSS}/bin/run.bat && chmod 755 ${JBOSS}/bin/run.bat && unix2dos ${JBOSS}/bin/run.bat'


On Unix I do a similar thing, uncommenting this line in <JBoss>/bin/run.conf:

#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"


Uncommenting in Unix shell scripts is simply done by removing the # character at the beginning of the line.

JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"


These are my aliases on UNIX for turning debug on and off.

alias debugon="changeString.sh '^#JAVA_OPTS=\"\$JAVA_OPTS -Xrunjdwp:transport=dt_socket' 'JAVA_OPTS=\"\$JAVA_OPTS -Xrunjdwp:transport=dt_socket' ${JBOSS_HOME}/bin/run.conf"
alias debugoff="changeString.sh '^JAVA_OPTS=\"\$JAVA_OPTS -Xrunjdwp:transport=dt_socket' '#JAVA_OPTS=\"\$JAVA_OPTS -Xrunjdwp:transport=dt_socket' ${JBOSS_HOME}/bin/run.conf"


One of the reasons I created the scripts was because on Windows suspend=y by default. Therefore when in debug mode you have to start your debugger or the JBoss server will not completely start up. On Unix suspend=n by default. If you change suspend=n on Windows too then the server will start up without waiting for the debugger to attach.

Note that you can only have one server with debug on for a given port, e.g. port 8787.  So if you try to start more than one JBoss server with that port, only the first will start.  The solution is to start only one server with debug on or start different servers with different debug ports.

Share
Leave a Comment : more...

ATG Confirm Password Bug in ProfileFormHandler

by on Nov.22, 2010, under Personalization

Long-billed Curlew (Numenius americanus) birds on Morro Strand State Beach during a golden sunset. Also characteristic of Montana de Oro area to the south. | Flickr

Long-billed Curlew birds by mikebaird

Hi ATG Support,

I noticed a bug in how ATG’s ProfileFormHandler (ATG Java API) handles confirm passwords when creating a new profile.  Note that this bug happens only if you persist anonymous profiles.

During registration when you call handleCreate it calls createProfileItem and then updateProfileAttributes. In updateProfileAttributes it checks if the password matches the confirm password. If they don’t match it adds a form exception.

However at this point it has updated the profile attributes including the login. Therefore after the user sees the error about the passwords not matching, corrects it and resubmits the form she will see an error that the login is already taken.

The work around is to set creatNewUser to true but since the default value is false most developers will see this bug.

Update 12-22-2010: ATG confirmed this is a bug.

Hi Frank,

Thanks for the information and details. I’m glad that using ProfileFormHandler.createNewUser=true works for you. You might want to periodically check the size of the dps_user table and purge the anonymous profiles, if needed.

For your reference, I have created PR#DPS-167714 “ProfileFormHandler Confirm Password” to track the issue.

Kind Regards,
Kristi Coleman

Share
Leave a Comment more...

Load ATG Order

by on Nov.14, 2010, under Commerce, Programming

Crystal Ball | FlickrCrystal Ball by David Reece

You can always look up an order in the repository using it’s ID.  But then you want to use the properties of this order object you will always be calling getPropertyValue and casting it to the type you expect.

A better and much simpler way is to look up the order using the OrderManager.  Then you get a strongly typed Order object and don’t have have to deal with the repository.  Life has become a little easier. :-)

OrderManager orderManager = getOrderManager;
Order order = orderManager.loadOrder(orderId);


Now that you have the order you can also get the profile for that order.

RepositoryItem profile = getProfileTools().getProfileForOrder(order);
Share
4 Comments more...

Turning on Secure for ATG Applications

by on Nov.10, 2010, under Configuration

Closed for business | FlickrClosed for business by maistora’s Photostream | Flickr

Almost all web applications have some parts of their site they want to be secure such as login and profile pages.

To enable security ATG has a ProtocolSwitchServlet, located at /atg/dynamo/servlet/dafpipeline/ProtocolSwitchServlet. Set the enable property to true and configure the other properties appropriately.

The only other properties that you will need to configure are the secureList property and the ignoreList property.  Examples of how these properties would be configured follow.

secureList=/myapp/account,/myapp/checkout
ignoreList=/myapp/css,/myapp/javascript

Optionally you might want to change the secureHostName and the httpsPort but typically it would be better to change siteHttpServerName and httpsPort respectively in /atg/dynamo/Configuration.

The default values for the other properties should be fine.

Share
Leave a Comment more...

Tweets for September, October 2010

by on Oct.03, 2010, under Miscellaneous

PHP

  • Disallowed Key Characters – CodeIgniter Error | Snaver.net Blog. Excellent way to debug it, should be part of library. http://bit.ly/bVkRF6 #
  • Wiki | CodeIgniter – mod rewrite. This article explains how to take away “index.php” from your CI application URLs. http://bit.ly/bpfL8z #

SQL

ATG

Unix

  • .bash_profile vs .bashrc. On the Mac .bash_profile is called for each terminal window so there isn’t a reason for both. http://bit.ly/aWqsW9 #

Java

  • Write simpler equals & hashCode Java methods using EqualsBuilder & HashCodeBuilder from Apache Commons http://bit.ly/8XiB2j #
Share
Leave a Comment more...

ATG Log Error from JSP Page

by on Sep.27, 2010, under Page Development

"The page cannot be displayed" | Flickr

"The page cannot be displayed" by Peter Kaminski

Unlike this IKEA sign, you usually don’t want to display errors on your web pages.  ATG allows you to log errors to the server log from a JSP page.  Below is an example of how to do this.  In this case if we find the price is null we log an error to the server log.

<dsp:getvalueof id="price" idtype="java.lang.Double" param="currentItem.priceInfo.amount"><%if (price == null) {  atg.servlet.DynamoHttpServletRequest dreq = atg.servlet.ServletUtil.getDynamoRequest(request);  dreq.logError("price is null!”);}%></dsp:getvalueof>
Share
Leave a Comment :, more...

Subversion Undeleting

by on Sep.22, 2010, under Subversion

Tips de SVN

Tips de SVN by dbasulto

I am always forgetting how to undelete.  I wish subversion made it easier but the only way to do it is to do an svn copy of the last version.  For example:

svn cp url/to/removed/foo.txt@4 .

You can find the URL by looking in .svn/entries.

For more info please see What’s a simple way to undelete a file in subversion?

Share
Leave a Comment more...


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!