|By Richard (Rik) Brooks||
|January 1, 2013 04:00 PM EST||
Have you ever used a datastore that ran without a problem while you were developing your application, but once you've compiled it stopped running? Let me tell you that's a difficult bug to fix.
I remember it so well. I kept going back and forth. How in the world could the DataWindow work at design time yet not in the executable? I remember that I checked the return value of the datastore. I finally noticed that the datastore returned a -1. That's such a strange thing.
The datastore returns the number of rows that were returned or a -1. The help files used to say that a -1 was in case of 'an error'. It goes into a lot more detail in version 12.5 but still falls somewhat short of giving you the whole answer.
Here it is...
If you set the dataobject property of a DataWindow or datastore object, then at runtime PowerBuilder will be unable to find it. You will get a return value of -1.
Let me be clear. Take a look at the following code:
lds_employee_list = create datastore
lds_employee_list.dataobject = "ds_employee_list"
ll_num_rows = lds_employee_list.retrieve()
I'm sure that you've written code like that before. The subject of this article is found in the third line. In that line we set the dataobject property of the newly created datastore. Oh let's step back just a little. In this example I am assuming that you created a new DataWindow and named it ds_employee_list. You'll be able to see it right there in the library painter or in the system tree.
Then in some appropriate event you put the code that I just pointed out.
Now while you're running the code through PowerBuilder there is no problem at all. It will work great. But once you compile the code the last line of this script will always leave ll_num_rows holding a -1.
Isn't that strange? Then you go back to running it through PowerBuilder and sure enough, it works fine. So you optimize the libraries and make sure you do a full rebuild and guess what?
It still returns a -1. That just can't be. That's when you go to your boss and utter those fateful words that make you sound like a compete fool...
But... but... it works just FINE on MY machine.
You can't imagine how bosses hate to hear that.
Here's the issue.
When PowerBuilder runs and encounters that third line it goes out and looks for ds_employee_list. First it looks in the current pbl then, if it doesn't find it, PowerBuilder looks through the library list for it. Eventually PowerBuilder will almost always find that DataWindow object and everything is fine.
The problem happens when we are running the executable. When PowerBuilder builds the executable it pulls the DataWindow object into the pbd. It does that when it's looking through the window painter. It doesn't look though the code to identify those DataWindow objects to pull into the pbd.
This means that at runtime our executable will not be able to find the DataWindow object. Ds_employee_list will simply not be available and the retrieve will return a -1.
How do we fix this? We use the PBR file. That's the file where you put your bitmaps so they will be included into the executable and we won't have to deploy bitmap files with the executable. Here's how it works, you specify the pbl that contains ds_employee_list and then the DataWindow name in parenthesis.
Then, in the project painter you specify that my_app.pbr is your PBR file.
Okay, our mystery is solved, right?
The problem came back when I started using Appeon. It was just a bit more complex though. Now the application works at design time. It works when running the executable, but when running in the browser I get that -1.
A little research taught me that Appeon doesn't support the PBR file.
How do I get that DataWindow object where it needs to be?
Appeon has a button called Configuration. When you click on it you get the Appeon Developer Configuration. Look at Figure 1.
In the Appeon Developer Configuration you need to select the application that you are currently using. Then click on Edit. That will take you to Figure 2, The Application Profile Configuration. This is a tool with which you really need to become familiar, for now though, click on the 'Additional Files' tabpage. That will give you Figure 2.
Note the highlighted line. It specifies my appeon_mdi.pbl. This tells Appeon that when you deploy your application it should make all of the DataWindow objects in that pbl available for dynamic DataWindows. It is in fact, similar to the PBR for DataWindows.
Oh yeah, the PBR file also specifies bitmaps, icons and the like. That is handled on this tabpage as well. Look at the group box that says Deploy Image Files. If you specify a folder then Appeon will look in that folder and bring in the bitmaps, icons, jpg, png, and other resource files.
Just so you know.
I recently attended and was a speaker at the 4th International Internet of @ThingsExpo at the Santa Clara Convention Center. I also had the opportunity to attend this event last year and I wrote a blog from that show talking about how the “Enterprise Impact of IoT” was a key theme of last year’s show. I was curious to see if the same theme would still resonate 365 days later and what, if any, changes I would see in the content presented.
Nov. 27, 2015 11:00 PM EST Reads: 411
Cloud computing delivers on-demand resources that provide businesses with flexibility and cost-savings. The challenge in moving workloads to the cloud has been the cost and complexity of ensuring the initial and ongoing security and regulatory (PCI, HIPAA, FFIEC) compliance across private and public clouds. Manual security compliance is slow, prone to human error, and represents over 50% of the cost of managing cloud applications. Determining how to automate cloud security compliance is critical to maintaining positive ROI. Raxak Protect is an automated security compliance SaaS platform and ma...
Nov. 27, 2015 06:00 PM EST Reads: 413
We all know that data growth is exploding and storage budgets are shrinking. Instead of showing you charts on about how much data there is, in his General Session at 17th Cloud Expo, Scott Cleland, Senior Director of Product Marketing at HGST, showed how to capture all of your data in one place. After you have your data under control, you can then analyze it in one place, saving time and resources.
Nov. 27, 2015 04:00 PM EST Reads: 174
Today air travel is a minefield of delays, hassles and customer disappointment. Airlines struggle to revitalize the experience. GE and M2Mi will demonstrate practical examples of how IoT solutions are helping airlines bring back personalization, reduce trip time and improve reliability. In their session at @ThingsExpo, Shyam Varan Nath, Principal Architect with GE, and Dr. Sarah Cooper, M2Mi’s VP Business Development and Engineering, explored the IoT cloud-based platform technologies driving this change including privacy controls, data transparency and integration of real time context with p...
Nov. 27, 2015 02:00 PM EST Reads: 411
The Internet of Things (IoT) is growing rapidly by extending current technologies, products and networks. By 2020, Cisco estimates there will be 50 billion connected devices. Gartner has forecast revenues of over $300 billion, just to IoT suppliers. Now is the time to figure out how you’ll make money – not just create innovative products. With hundreds of new products and companies jumping into the IoT fray every month, there’s no shortage of innovation. Despite this, McKinsey/VisionMobile data shows "less than 10 percent of IoT developers are making enough to support a reasonably sized team....
Nov. 27, 2015 12:00 PM EST Reads: 464
Internet of @ThingsExpo, taking place June 7-9, 2016 at Javits Center, New York City and Nov 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with the 18th International @CloudExpo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world and ThingsExpo New York Call for Papers is now open.
Nov. 27, 2015 12:00 PM EST Reads: 542
With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York and Silicon Valley. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be! Internet of @ThingsExpo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 17th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound cha...
Nov. 27, 2015 11:45 AM EST Reads: 538
Just over a week ago I received a long and loud sustained applause for a presentation I delivered at this year’s Cloud Expo in Santa Clara. I was extremely pleased with the turnout and had some very good conversations with many of the attendees. Over the next few days I had many more meaningful conversations and was not only happy with the results but also learned a few new things. Here is everything I learned in those three days distilled into three short points.
Nov. 27, 2015 11:00 AM EST Reads: 315
DevOps is about increasing efficiency, but nothing is more inefficient than building the same application twice. However, this is a routine occurrence with enterprise applications that need both a rich desktop web interface and strong mobile support. With recent technological advances from Isomorphic Software and others, rich desktop and tuned mobile experiences can now be created with a single codebase – without compromising functionality, performance or usability. In his session at DevOps Summit, Charles Kendrick, CTO and Chief Architect at Isomorphic Software, demonstrated examples of com...
Nov. 27, 2015 10:45 AM EST Reads: 384
As organizations realize the scope of the Internet of Things, gaining key insights from Big Data, through the use of advanced analytics, becomes crucial. However, IoT also creates the need for petabyte scale storage of data from millions of devices. A new type of Storage is required which seamlessly integrates robust data analytics with massive scale. These storage systems will act as “smart systems” provide in-place analytics that speed discovery and enable businesses to quickly derive meaningful and actionable insights. In his session at @ThingsExpo, Paul Turner, Chief Marketing Officer at...
Nov. 27, 2015 10:45 AM EST Reads: 399
In his keynote at @ThingsExpo, Chris Matthieu, Director of IoT Engineering at Citrix and co-founder and CTO of Octoblu, focused on building an IoT platform and company. He provided a behind-the-scenes look at Octoblu’s platform, business, and pivots along the way (including the Citrix acquisition of Octoblu).
Nov. 27, 2015 10:00 AM EST Reads: 491
In his General Session at 17th Cloud Expo, Bruce Swann, Senior Product Marketing Manager for Adobe Campaign, explored the key ingredients of cross-channel marketing in a digital world. Learn how the Adobe Marketing Cloud can help marketers embrace opportunities for personalized, relevant and real-time customer engagement across offline (direct mail, point of sale, call center) and digital (email, website, SMS, mobile apps, social networks, connected objects).
Nov. 27, 2015 09:15 AM EST Reads: 292
The Internet of Everything is re-shaping technology trends–moving away from “request/response” architecture to an “always-on” Streaming Web where data is in constant motion and secure, reliable communication is an absolute necessity. As more and more THINGS go online, the challenges that developers will need to address will only increase exponentially. In his session at @ThingsExpo, Todd Greene, Founder & CEO of PubNub, exploreed the current state of IoT connectivity and review key trends and technology requirements that will drive the Internet of Things from hype to reality.
Nov. 27, 2015 07:45 AM EST Reads: 424
Two weeks ago (November 3-5), I attended the Cloud Expo Silicon Valley as a speaker, where I presented on the security and privacy due diligence requirements for cloud solutions. Cloud security is a topical issue for every CIO, CISO, and technology buyer. Decision-makers are always looking for insights on how to mitigate the security risks of implementing and using cloud solutions. Based on the presentation topics covered at the conference, as well as the general discussions heard between sessions, I wanted to share some of my observations on emerging trends. As cyber security serves as a fou...
Nov. 27, 2015 07:30 AM EST Reads: 323
Continuous processes around the development and deployment of applications are both impacted by -- and a benefit to -- the Internet of Things trend. To help better understand the relationship between DevOps and a plethora of new end-devices and data please welcome Gary Gruver, consultant, author and a former IT executive who has led many large-scale IT transformation projects, and John Jeremiah, Technology Evangelist at Hewlett Packard Enterprise (HPE), on Twitter at @j_jeremiah. The discussion is moderated by me, Dana Gardner, Principal Analyst at Interarbor Solutions.
Nov. 27, 2015 04:15 AM EST Reads: 712
Too often with compelling new technologies market participants become overly enamored with that attractiveness of the technology and neglect underlying business drivers. This tendency, what some call the “newest shiny object syndrome” is understandable given that virtually all of us are heavily engaged in technology. But it is also mistaken. Without concrete business cases driving its deployment, IoT, like many other technologies before it, will fade into obscurity.
Nov. 27, 2015 04:00 AM EST Reads: 338
With all the incredible momentum behind the Internet of Things (IoT) industry, it is easy to forget that not a single CEO wakes up and wonders if “my IoT is broken.” What they wonder is if they are making the right decisions to do all they can to increase revenue, decrease costs, and improve customer experience – effectively the same challenges they have always had in growing their business. The exciting thing about the IoT industry is now these decisions can be better, faster, and smarter. Now all corporate assets – people, objects, and spaces – can share information about themselves and thei...
Nov. 27, 2015 04:00 AM EST Reads: 230
The Internet of Things is clearly many things: data collection and analytics, wearables, Smart Grids and Smart Cities, the Industrial Internet, and more. Cool platforms like Arduino, Raspberry Pi, Intel's Galileo and Edison, and a diverse world of sensors are making the IoT a great toy box for developers in all these areas. In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists discussed what things are the most important, which will have the most profound effect on the world, and what should we expect to see over the next couple of years.
Nov. 27, 2015 02:30 AM EST Reads: 462
Discussions of cloud computing have evolved in recent years from a focus on specific types of cloud, to a world of hybrid cloud, and to a world dominated by the APIs that make today's multi-cloud environments and hybrid clouds possible. In this Power Panel at 17th Cloud Expo, moderated by Conference Chair Roger Strukhoff, panelists addressed the importance of customers being able to use the specific technologies they need, through environments and ecosystems that expose their APIs to make true change and transformation possible.
Nov. 27, 2015 02:00 AM EST Reads: 521
Microservices are a very exciting architectural approach that many organizations are looking to as a way to accelerate innovation. Microservices promise to allow teams to move away from monolithic "ball of mud" systems, but the reality is that, in the vast majority of organizations, different projects and technologies will continue to be developed at different speeds. How to handle the dependencies between these disparate systems with different iteration cycles? Consider the "canoncial problem" in this scenario: microservice A (releases daily) depends on a couple of additions to backend B (re...
Nov. 27, 2015 01:00 AM EST Reads: 431