Is there a working Cocoa MySQL Xcode project? - mysql

Or has this been abandoned? I can't seem to find a modern sample project. I haven't been able to make any the old code I find work. I just want to write a simple Mac app that accesses an external MySQL database that's also involved in a PHP website.

The old CocoaMySQL project has been abandoned, but the project has been resurrected as Sequel Pro.
It's open source and you can get the source code here.
If you want a straight library that allows you to access MySQL, you might try the commercial MacSQL framework.
You can also just use the MySQL C API directly, however be careful because if you want to use this in a commercial app the licensing fees are high.
You might find it easier to write some PHP code on the server to deliver the results to your client using JSON or some other lightweight data interchange format. PHP has direct support for JSON and there is a great Cocoa framework that makes it easy to parse and generate JSON code.
This method allows you to completely abstract the database connection from your client, so it is relatively trivial to change the database if necessary in future.

Thanks, Rob, I have actually seen the links to Sequel Pro but I was confused when I got there. Part of my problem is that I am really bad at adding things to an Xcode project. Once I have a project in hand with the correct libraries and whatever all linked up, I can make use of the various methods or functions.
That's why I was asking if someone had a super simple project using MySQL that would hopefully compile for me right out of the box. I can then add all my objects and coding.
Can't seem to find anyone out there willing to hold the hand of us project-challenged. The project settings dialog box and codes that go in various boxes therein are very confusing to me.

Related

Need help regarding CGI scripting with C

I need to process some of files stored on the server side and display the list of files on a web page in a browser. My server is set-up on an arm-processor and it is mini(thttpd). And only support CGI script(with C) as far as I know.
So I am asking, whether with this current set-up, can I process file system on server side and display details(like file names) on a web page upon browser interaction by just plain CGI scripting using C??? I was unable to find convincing tutorials regarding this on CGI. And installing any other components on server will be difficult as it needs to be cross-compiled against arm-platform and the also system being embedded(low on memory). I am a total newbie to this scripting. So please forgive me if you found this post silly or stupid.
And also it would be nice if you help me find some good scripting tutorials.
Check out my dusty old Getting Started with CGI Programming in C. It might be difficult to find good new material on the topic these days, as most people do server-side programming with other, better tools. But things like you describe would be possible. The main concern would be security, especially if you would allow the user to delete or modify files on the server.

Starting up a node.js project

I'm about to start a project that's going to be a web site for storing photos. The method for uploading shall be drag and drop (from the desktop, same as Imgur), and it shall be possible to rate the photos as well commenting them.
For the project I'm going to use Node.js as well as HTML5, CSS3 and jQuery. The thing is that I'm a total newbie on Node.js and really could use some help regarding getting started. For the project I will of course need a database, and I have understood that MongoDB is a good choice. Is there any templates for this combination, so that I don't need to start from scratch?
I have installed Node.js and followed some tutorials but I really feel that I want to a template if there is one.
Thanks in advance!
As you said you are a beginner you can take the best independent modules for your project and start using. Instead of having a pre-defined package of necessary components as a single module. Problem is you may end up not understanding the whole pack and become more biased.
So,
I would suggest to use Expressjs (Best Choice) for url routing as mentioned above.
And,
File upload management:
formidable - a high performance file upload server with file parts reading and progress notifiers etc.
Template Engine (Markup libs for your custom htmls):
Jade
coffeekup
And consider Bootstrap as well for prebuilt templates if in case you need it.
Mongo - Good choice.
Mongo Modules
These libs should help.
Take a look at HTML5 Boilerplate + Express.js
As a basic starting point, this is a popular framework:
http://expressjs.com/
Here you will find some links to example applications:
Node.js Web Application examples/tutorials
https://github.com/heroku/facebook-template-nodejs
Open Source Node.js (and Express) projects
Express JS is good but I would recommend you have a look at Railway JS as well.
It is based on Express with support for numerous template engines and database adapters (including MongoDB). It is a lot more modular so you should not have much trouble working with it (in my opinion).
Check out: Uploading images using Node.js, Express, and Mongoose too.
Here is a list of resources that I have compiled using themeefy to start a node.js project http://www.themeefy.com/AvinashEga2/nodejs
I think Tower.js is something like what you're after.

WIX InstallUtil/InstallUtilLib and Configuration File Deployment why is InstallUtil bad?

I often find the quote "InstallUtil.exe" is an ugly pattern or "Don't use InstallUtil.exe" and that I should use native WIX or Installation package patterns and I still don't understood why.
I stepped away from using InstallUtil to install a .NET service as I finally learnt that writing registry keys for such an action should be an un-install-able action - and I've come to terms with this as correct.
As I've been working through my WIX installer for a relatively complex product, I have found myself in need of creating or updating SQL Server databases, creating or updating IIS Applications and finally updating or creating configuration files.
Each of my components (features) are optional, but they all share the same configuration file. As my product uses unity, its important to note that this library contains strong support for reading/updating/removing components from the Unity Configuration block, therefore it seems fairly smart to me that I should take advantages of these blocks via Installation Components (i.e. InstallUtil) to create or update my configuration file at installation time.
Just to be clear here, my installer does not natively contain a configuration file for my application: at installation time, the installer has no idea as to the shape of it as its based on the features selected. Surely I should be embedding this knowledge into each of the modules that are to be deployed and not in the remit of the installer which is now a completely independent project? Wouldn't this break O-O principals even if we are talking about installation?
I'd really appreciate some guidance as to whether this is good practise or not? Am I reading 'InstallUtil' is bad for installing services, or is it that using 'InstallUtil' is bad full-stop? If so, what are my options for smart updating of configuration files?
The main reason for avoiding InstallUtil is that it runs outside of the installation transaction, so Windows Installer cannot keep track of what it's done.
I have used InstallUtil on a few occasions, when I just couldn't get Wix to do what I needed and didn't have time to write a custom action. In this case I called the InstallUtilLib version as I feel this is a cleaner approach.
I used the this blog as a guide as to how to achieve this.

Working with MySQL and Xcode

I've been programing for some time now, and the thing I get asked the most is, how about MySQL database.
What are some good sites for learning about data base programing with xcode, so I can make a app work together with a web site?
To integrate an iPhone/iPad application with mysql you need to develop webservices and then call them in your app. I would suggest the use of JSON, SOAP, XML or PHP, some examples:
http://www.raywenderlich.com/2941/how-to-write-a-simple-phpmysql-web-service-for-an-ios-app
http://www.icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/
http://www.devx.com/wireless/Article/43209
There are a lot of combinations possible.... you can use php or .net or other frameworks, so it's hard to give you a complete list of tutorials.
If you want to develop a regular iOS application, i would suggest this link:
http://blog.iosplace.com/?p=30
Hope it helps.

BMC Remedy Integration

Where can I find a list of BMC Remedy 3rd party integrations? I have found nothing on their website, and their sales department put me in touch with the customer services which wouldn't take my call because I didn't have a customer number.
My company is looking into using BMC Remedy as a customer incident system, and it would be nice if I could integrate it with some software. For example, we could have an internal development tracking system such as Jira, Redmine, MantisBT, Trak, etc. which would integrate with Remedy. Or, have Rememdy itself integrate with something like Hudson or CruiseControl.
So far, I've found nothing that seems to integrate with Remedy -- even with software packages that have a ton of integrations like Hudson and Jira. I don't really care if there are third party proprietary integrations, but I'd like to make sure they already exist and not All you have to do is hire someone at $400 to program everything for you. I want to make sure that there is something now and not be promised it can be done, then find out you really can't do it.
I may be a bit late to the party here, but I wanted to make this info available for anybody who happened to be searching for this answer in the future. BMC Remedy has an API in Java, which uses a native library in C, as well as bindings for Perl and other languages capable of calling native code. If you can integrate with any of those languages, you can write a custom integration program and integrate with that. As 'Gary L' mentioned, Remedy can also expose any form as a web service, which, in my experience, have simple interfaces.
Since the original question was asked, BMC have created a doc with a wealth of information on their Wiki. A Swedish company, RRR, has also collected every version of the Remedy Java API and required native libraries on a single page. It appear that you no longer need a support ID to access these pages and download the API files.
Hopefully somebody finds this helpful!
Your definition of "integrate" is different from their version. Their version of integration means that if a source system exposes its data, then you can configure ARS to retrieve that information and map it to classes (forms) within their system. They have a "generic" integration system that you have to customize. It has three broad areas:
If you can connect directly to a 3rd party database and see its schema, then you can perform
retrievals of that information. We use Oracle today.
They have a java API that allows you access the ARS system for custom code (I do a lot of this).
Flat CSV file importation of data from a source system into ARS (after export).
I looked at their online support for the systems you mention (Jira, Redmine, MantisBT, Trak) and do not see anything that would accomplish any of the three above without your own customizations. With the work that I've done on this system it doesn't surprise me.
I work on a project today that writes custom code doing the items above. It is a system that is configuration/development heavy for us. Your comment: "All you have to do is hire someone at $400 to program everything for you." is not too far off from what we have to do with the system.
There is another option for Remedy integration: Web Services.
BMC Remedy makes it easy to create web services (WSDL). It creates the SOAP and XML for you. When you buy Remedy Incident Management module, it includes out-of-the-box web services that will allow it to consume and/or publish web services which make it easy to integrate with other systems on the intranet or externally. There are BMC publications which provide details on ITSM integration --- but again you will need a customer/support ID to get it from BMC's website.
Yes and no to the Web Services integration. The Version 8 system I was working on had some web services available, and they were incomplete. So I was able to do a number of functions (mostly read-only), specifically for custom display and Change Request checking, and submission of a Change Request and a Work Order. But many functions had no web service, and I ended up brute-forcing through the web user interface (with a customized browser control) to change dates on tasks, or make tasks. Ugly, but effective. There are mid-tier JavaScript calls that can be used, if you know the secret function name and can deal with the dynamic naming convention in play. For Remedy users who are desperate for some integration, there are ways it can be done.
few OOTB integrations are possible with BMC Products but if you want to do it with other you have to write webservices(REST or SOAP)
Companies like IBM or cisco has made connectors for integration with Remedy.
Just adding more detail here:
I also do a ton of direct SQL for remedy integration.
If you're careful and know what you're doing, you can have a stored proc create legal/valid records in a remedy table. (If you do it wrong, the records won't load in the client and in older versions of the windows client can actually crash the client software.)