Monday, September 9, 2013

Database Modeling / ERwin



In ERwin I found I needed to use the physical view if I wanted to create a join table against the same table for purposes of creating a hierarchy without adding a nullable self-referencing parentId column to the target table. Looks like there are a lot of resources on SQL Hierarchies (http://stackoverflow.com/questions/4048151/what-are-the-options-for-storing-hierarchical-data-in-a-relational-database) So I'll have to study a bit -- not to mention, I'll need to find out whether an ORM like NHibernate will handle it.

Two open source options for data modeling I found are mogwai ER Designer NG and SQL Power Architect.

 Forward engineering to SQL Server 2008 works well in ERwin, except for some quirks: It adds extraneous collation metadata; it forces you to uncheck a lot of options e.g. uncheck Schema Create, uncheck all Trigger checkboxes, and those changes aren't saved between sessions. Looks like you can save an option set though, extra work...

To get crows feet notation, choose Information Engineering instead of IDEF1x in Model properties. I learned that and other stuff from http://www.isqa.unomaha.edu/wolcott/tutorials/erwin/erwin.html

Monday, August 19, 2013

NMock3

Was going to use Visual Studio 2012's new ease-of-use mocking feature, but then discovered they removed the ease-of-use right-click create unit test feature. So I had to do that in Visual Studio 2010 instead, and for mocking used NMock3 which worked beautifully after I followed the example here: http://searchcode.com/codesearch/view/10455162

Sunday, August 11, 2013

ASP.NET MVC 4 plus EF CF Tutorial

followed first three of http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
Provides all the basics on code first migrations and ASP.NET MVC scaffolding

Sunday, July 28, 2013

Jetty Eclipse Tutorial

Following this as exercise: http://docs.codehaus.org/display/JETTY/Importing+Jetty+Source+into+Eclipse
which illustrates the use of the Maven Eclipse Plugin against jetty-6.
but it relies on old files, including cvs.exe. To work around I need to download sources manually via tortoiseSVN from https://svn.java.net/svn/glassfish~v2/trunk/pwc-commons, ./appserv-webtier, etc. directly to targets under modules, e.g. modules/jsp-2.1/target/glassfish, etc.
Then modify modules\jsp-2.1\pom.xml, replacing "extract-src" in ant task element with "update", doing same for jsp-api-2.1 folder. this is to prevent a cvs attempt at a defunct server (i.e. cvs.dev.java.net).

Sunday, May 19, 2013

JBoss Setup

Followed  http://davidghedini.blogspot.com/2011/03/install-jboss-6-on-centos.html
with CentOS 5.5 running on an old Dell Latitude D600 with 775MB RAM.

Was able to access admin-console once, but next day get HTTP Status 404.
Notice four run.sh processes running in top. May need to fix service script in /etc/init.d

When tried to edit /etc/init.d/jboss got an error regarding a file system being read-only. Reboot machine and run fsck -y to fix errors.

Monday, May 6, 2013

Word VBA, Template Customization

Learned about creating editable forms: http://www.sunyacc.edu/sites/default/files/Documents/ITS/word_-_creating_fillable_forms_legacy_tools.pdf

And how to insert a Field (Ctrl-F9)!  http://www.techsupportalert.com/pdf/e1182.pdf
and Alt-F9 to toggle!

And How to automatically execute a Word macro when you create, open, or close a document vs. AutoNew()

More on Auto Macros (tip from this link: hold down shift when pressing OK to prevent auto macros from running)

Microsoft's name for the ribbon and quick access toolbar is "Fluent User Interface"
ref: http://msdn.microsoft.com/en-us/library/office/ee704589(v=office.14).aspx

To remove a custom ribbon, simply edit the .rels file. see: http://msdn.microsoft.com/en-us/library/aa338202.aspx#OfficeCustomizingRibbonUIforDevelopers_AddingDocumentBasedAddIns
This also appears to reenable a greyed out File Options, and Customize Ribbon buttons.

To find a bookmark by name do Ctrl-Shift-F5. Note: Protection must be disabled.

Friday, May 3, 2013

Model Glue

Unpacked modelglue-framework-release-3.2-rc2.zip, copied contents (with root file ModelGlue.cfm) into a newly created folder "ModelGlue" under context root: C:\glassfish3\glassfish\domains\domain1\applications\cfusion\cfusion_war\ModelGlue

Thursday, May 2, 2013

CF, GlassFish, Oracle Express, etc. Installs

Run through ColdFusion 10 installation to produce an EAR file. Upload this file to create a new Application through the Glassfish administrator.

followed http://bpits.net/how-to-set-up-local-oracle-sql-database-in-3-steps/
Oracle Express Apex runs on 8080, so I needed to change Glassfish port using:
http://belial.pt/wp/en/how-to/the-best-way-to-change-glassfish-ports/

got started with cf on glassfish by following http://itreminder.blogspot.com/2010/03/deploy-coldfusion-89-on-glassfish-v3.html
still need to figure out the bundle tools for eclipse and how to debug, to read: http://dlc.sun.com.edgesuite.net/glassfish/eclipse/GF-Tools-for-Eclipse-Guide11.pdf

Download Model-Glue, Transfer-ORM (from riaforge as current link is dead), and ColdSpring. In the future may want to see about swapping Transfer-ORM with CF-ORM (Coldfusion ORM that has Hibernate integration?).

Reading http://www.coldspringframework.org/downloads/ColdSpring_Reference.pdf
gives hints on how the Java-beans spec works and provides a good into to IOC / DI.

Installed ColdSpring. Attempted to copy to http://localhost:8082/cfusion/test - continuing from itreminder blog above, but got error. Needed to unzip coldspring1-2-final.zip to "coldspring" in root cfusion context at C:\glassfish3\glassfish\domains\domain1\applications\cfusion\cfusion_war\. When that done, get valid page at http://localhost:8082/cfusion/coldspring/examples/quickstart/

Wednesday, May 1, 2013

CF Dev Environment Setup, VBA to CFML Conversion Research

For testing CF pages with an "integrated" server (Tomcat/Railo) did http://ipggi.wordpress.com/2011/10/07/embed-a-railo-coldfusioncfml-server-within-your-cfeclipseeclipse-application-with-no-need-for-xml-configurations/

Cracked a VBA (from previous day) using technique from http://gbanik.blogspot.com/2010/08/understanding-excel-file-internals.html

Research Apache POI and how it can be used to produce a CFML tag, e.g. "submit" to output a word docx from form wizard inputs.

Tuesday, April 30, 2013

VBA Work

Tasked to convert a VBA Word form to CF.

refresh knowledge of VBA (starting with Alt-F11, doh):
http://www.techrepublic.com/blog/10things/10-steps-to-creating-a-word-userform-for-addressing-letters/3519

Installed CFEclipse, start.bat to start railo tested a http://localhost:8888/test.cfm in Railo. Edited test.cfm in Eclipse with code: <cfdump var="#server#">

Monday, April 29, 2013

Railo

will start checking out Railo , e.g. to see source code for how session/application state and request lifecyle are implemented
work through https://github.com/getrailo/railo/wiki/Contributing%3ABuildingRailo

Thursday, April 25, 2013

Axis2 Eclipse How-to

followed tutorial "Create web service in Java using Apache Axis2": http://blog.sencide.com/2011/06/create-web-service-using-apache-axis2.html

Update 2013/04/26

Continued trying to create the client, said port type was empty. Lo and behold, I forgot to save the .java file with added addTwoNumbers method. Now how to update the web service? go through the Add File - Web Service wizard with same options but got "IWAB0164E Cannot overwrite the file "FirstWebService.class" relative to the path "/MyFirstWebService/WebContent/WEB-INF/services/FirstWebService/com/sencide" because automatic file overwriting has not been enabled. Do you want to enable it for this file"

I chose "Yes to All" and proceeded with rest of tutorial.

Finally to run from command line:

C:\Users\awg T\EclipseWorkspaces\Axis2Tut\MyFirstWebService\build\classes>java -cp .;"C:\Users\awg T\Downloads\axis2-1.6.2-bin\axis2-1.6.2\lib\*" com.sencide.TestClient
log4j:WARN No appenders could be found for logger (org.apache.axis2.description.AxisOperation).
log4j:WARN Please initialize the log4j system properly.
12

Wednesday, April 24, 2013

Git repo soap4r forked

made update to this to run in Ruby 2.0.0


Welcome to Git (version 1.8.1.2-preview20130201)


Run 'git help git' to display the help index.
Run 'git help ' to display help for specific commands.
AWG tek@awgtek ~
$ dir
sh.exe": dir: command not found
AWG tek@awgtek ~
$ mkdir awgteksoap4r
AWG tek@awgtek ~
$ cd awgteksoap4r/
AWG tek@awgtek ~/awgteksoap4r
$ git clone https://github.com/awgtek/soap4r.git
Cloning into 'soap4r'...
remote: Counting objects: 880, done.
remote: Compressing objects: 100% (717/717), done.
emote: Total 880 (delta 192), reused 748 (delta 141)Receiving objects:  99% (872
Receiving objects: 100% (880/880), 836.68 KiB, done.

Resolving deltas: 100% (192/192), done.
Checking out files: 100% (642/642), done.
AWG tek@awgtek ~/awgteksoap4r
$ ls
soap4r
AWG tek@awgtek ~/awgteksoap4r
$ ls -la
total 6
drwxr-xr-x    3 AWG tek adm        0 Apr 24 16:31 .
drwxr-xr-x    1 AWG tek adm     8192 Apr 24 16:29 ..
drwxr-xr-x   16 AWG tek adm     4096 Apr 24 16:31 soap4r
AWG tek@awgtek ~/awgteksoap4r
$ ls
soap4r
AWG tek@awgtek ~/awgteksoap4r
$ pwd
/c/Users/AWG tek/awgteksoap4r
AWG tek@awgtek ~/awgteksoap4r
$ cd soap4r
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ ls
COPYING  README.rdoc  Rakefile  install.rb  rubyStyle.css  soap4r.gemspec
GPL      RUBYS        bin       lib         sample         test
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git config --global user.name redacted
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git config --global user.email redacted
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git status
# On branch master
nothing to commit, working directory clean
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#       modified:   install.rb
#
no changes added to commit (use "git add" and/or "git commit -a")
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ ls
COPYING  README.rdoc  Rakefile  install.rb  rubyStyle.css  soap4r.gemspec
GPL      RUBYS        bin       lib         sample         test
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git add install.rb
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD ..." to unstage)
#
#       modified:   install.rb
#
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git commit -m "Updating install.rb for ruby 2.0.0"
[master 8721f43] Updating install.rb for ruby 2.0.0
 1 file changed, 17 insertions(+), 7 deletions(-)
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$ git push -u origin master
Username for 'https://github.com': awgtek
Password for 'https://awgtek@github.com':
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 626 bytes, done.
Total 3 (delta 2), reused 0 (delta 0)
To https://github.com/awgtek/soap4r.git
   68483b8..8721f43  master -> master
Branch master set up to track remote branch master from origin.
AWG tek@awgtek ~/awgteksoap4r/soap4r (master)
$