{"id":1525,"date":"2014-06-19T19:12:00","date_gmt":"2014-06-20T00:12:00","guid":{"rendered":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=1525"},"modified":"2019-12-10T16:21:04","modified_gmt":"2019-12-10T21:21:04","slug":"i-am-studying-nhibernate","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=1525","title":{"rendered":"I Am Studying NHibernate"},"content":{"rendered":"<p>I have not blogged about programming for a long time. That does not mean that I have not been improving my skills. I frequently come across something new and document it for my notes. For example, I recently discovered that web browsers can unexpectedly do form validation with built-in validation triggered by new HTML5 tag attributes. Since this unexpected behavior caught me by surprise twice, I researched the HTML5 Constraint API for Form Validation and added it to my notes. It is quite puzzling when the browser is doing form validation even though you don&#8217;t have any code for form validation!<\/p>\n<p>Over the past few days I have been learning how to use <a href=\"http:\/\/sourceforge.net\/projects\/nhibernate\">NHibernate<\/a>. <b>NHibernate<\/b> is an object-relational mapping (ORM) solution for the Microsoft .NET platform. I have been using SubSonic for object-relational mapping but I think the developers have abandoned that project. NHibernate is more difficult than SubSonic since you have to create your own classes. I did find a program to generate the classes, <a href=\"http:\/\/nmg.codeplex.com\/\">NHibernate Mapping Generator<\/a>, but it is not as convenient as SubSonic.<\/p>\n<p>The main advantage to using object-relational mapping is that you can make changes to your database tables without having to rewrite a lot of code. Usually you only need to add a line of code for a new column or change a line of code if you change a column&#8217;s data type. You won&#8217;t need to revise a lot of SQL strings in your code. A project in development may require many changes to the database schema so this can save a lot of time.<\/p>\n<p>Today I learned how to select all records in a table, how to select records based on multiple criteria, and how to create a traditional SQL query which may be necessary for complicated queries. As with any database API, you have to learn how to do CRUD (Create a record, Read a record, Update a record, and Delete a record). I usually add an example of how to select all records and loop through the result set.<\/p>\n<p>I plan to redesign my web site soon. I need to find new clients because I don&#8217;t have any freelance work to do right now. In the meantime, I will continue to make trips around Pennsylvania. There are still a few towns I could visit like Danville, Bloomsburg, and State College. I also want to explore the Poconos some more since there are many resorts there with a variety of recreational activities. I am particularly interested in Stroudsburg and will be doing a thorough investigation of the city and its resources. Today I learned exactly where the Pennsylvania Welcome Center is located in Delaware Water Gap and I clarified the location of the Martz Bus Terminal where you can catch a bus to New York City.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have not blogged about programming for a long time. That does not mean that I have not been improving my skills. I frequently come across something new and document it for my notes. For example, I recently discovered that &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=1525\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,12],"tags":[926,925,922,924,923],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1525"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1525"}],"version-history":[{"count":2,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1525\/revisions"}],"predecessor-version":[{"id":3400,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1525\/revisions\/3400"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1525"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}