how to create XML Editor for MAC? - macos

I need to build a XML EDITOR for MAC?
Can anybody help me in this regard? How should I proceed?

This is a very open ended question.
You can build applications for Mac OS X in a variety of languages/technologies. Common choices include:
Objective-C
Java
If you're developing in Objective-C (the native development platform for OS X), you'll need XCode from Apple.
You'll probably want to learn Cocoa (the UI framework on OS X) and the core libraries (Core Foundation, Core Data etc).

Oh, where to begin?
First of all, take note of Michael Shimmins' answer; you'll need Xcode to do the program. While his answer mentions Java, I would avoid that, and go for Objective-C.
As for the application itself, it all depends on how you want to edit the XML; some more information would be great on this point.
If you want a text-editor style XML editor, you should probably start with a simple Document-Based Cocoa Application; and put in an NSTextView, and see where you can go from there; if, on the other hand, you want a tree-based editor; you'll need to have a look at NSOutlineView and NSXMLDocument, part of the NSXML bits of Cocoa.
Then you'll need to design your application, program it, test it, and finally, if applicable, release it.

My advice would be to buy, not build.
There are also free XML editors, or free versions of commercial XML Editors.

Related

Easy GUI programming in Mac OS X. Targeting Windows Platform

I have a friend who has an entry-level background in programming and is looking for a free GUI framework (IDE, GUI toolkit and GUI designer ) that:
He can use on Mac OS X to build Windows applications
It's very easy to use.
He is not interested in becoming a programmer, but would like to build an application for his work (not CS-related).
What are some good GUI frameworks/prog. languages he can use?
Qt including Qt Creater and Qt Designer is worth a try.
Especially, if your app should finally run cross-platform, on phones or on other embedded devices. Qt natively supports C++, but can also be used with 3rd-party extensions with Python (PyQt) and probably other languages.
On a Mac I have to recommend making Cocoa applications in Xcode written in Objective-C. Xcode is free to download and use, you pay if you want to submit applications to the Mac App Store.
I personally use Xcode every day and I think it's a great IDE. Currently has compiler support for Obj-C, C++, C and maybe more (not sure). More importantly for your needs, Xcode does a great job of integrating your code with its build in "interface builder" to help you quickly and easily create a nice UI.
NOTE: Xcode includes a new compiler feature (ARC) Automatic Reference Counting which is create for a new user. You can learn the language without having to worry about manual memory management.
Your friend should consider using PySide, a Python binding for the Qt GUI framework already mentioned.
With PySide you can use the Qt tools to create GUI elements interactively
and code your application logic in Python, which is a language often appreciated by non-programmers (and programmers too!) for its simplicity and intuitiveness.
Xcode includes a WYSIWYG editor for native controls and views. This was formerly a separate program called Interface Builder, but the editor was moved into the Xcode IDE at version 4.
AppKit is the framework it uses in most cases -- that's Objective-C. It's well supported. Your friend can also use it for source code editing and building and debugging apps. If he wants to write UIs programmatically, Xcode and AppKit are also good options.

Plausibility of combining Kod and Komodo Edit?

I would like to know how difficult it would be to merge the well-designed Kod editor and the powerfully-built Komodo Edit together. I'd like to think it could turn into a native Mountain Lion programming editor with a simple interface (focus on elegance) and yet with powerful editing features.
Kod is a native OS X app, while Komodo is a cross-platform app based on Mozilla code. Both are under "open-source" licenses - Kod's license seems very permissive, and Komodo's is... long. I'm still deciphering it, but it seems like one could take code and put it into a new project.
I see this as becoming a new open source project: Kodmodo. I just don't know how compatible the source could be between the two programs.
Kod looks interesting but quite young. An editor without a preferences section for keybindings and color schemes? Might develop into an interesting project (node.js based). Quite a bit of Komodo Edit is done in javascript.
Alas, the main implementation language for Komodo is Python and the interfaces (opening files etc) are Mozilla. Kod uses OSX goodies and states on their main page that
Written from scratch with modern OS X 10.6 APIs providing maximum OS integration (empahsis added)
It would be near impossible to integrate OpenKomodo and Eric where both use python for development and macros and scintilla for the edit component. Komodo and Kod will never happen because they start from different places entirely.

Is it possible to view the source of a mac app?

Would be usefull to see how things work but not sure on the legality of it
Most Mac apps are written using Cocoa in Objective-C; which, while it is a compiled language, means that there is a fair bit of information left over that could be used by a decompiler.
I'm not sure if there are a lot of decompilers out there that leverages this information, at least I haven't heard of any.
However, there are also another option; F-Script.
F-Script can be used to attach to an executable and explore its interfaces, while not as good as source, it can give you a pretty clear idea of how the executable is built, and how it operates.
As for the legality issue:
IANAL, but as far as I know, reverse-engineering for the purposes of compatibility is legal in many jurisdictions, and I can't imagine that decompiling an executable to look at its code is illegal, unless the specific EULA specifically prohibits it.
Edit: WRT Steam specifically, it is probably NOT written in Cocoa, but C# with some manner of .NET compatibility layer; and it's probably not a good place to start if you want to learn how to make applications for Mac OS X.
By far, the best Mac OS X disassembler I've used is Hopper available here:
http://www.hopperapp.com/
It will also convert the assembly to C pseudo code as best it can. It will generate code flow diagrams with blue lines (true blue, love it) for true and red for false paths.
It's The Mac OS reverse engineering tool. There are even Youtube videos that will show you how to use it.
If it's an open-source app, yes. Otherwise it's possible through decompilation but the output will be a real pain in the ass to look at. If you just want the protocols and the interfaces of categories and classes, have a look at class-dump.
I'm not aware of a nib decompiler.
Whether decompilation is legal: ask a lawyer. This may (and probably does) differ per jurisdiction.
Is it possible to view the source of a mac app?
Realistically, no. Sure, you might be a able to use a decompiler to get a peek, but the kind of output you'll get won't be easy to read. If you're asking this question, this route probably isn't going to be helpful to you.
Specifically interested in GUI and how the steam app for mac works
It's a good bet that it works about the same way that most other applications work. It might use custom controls to look different from a typical application that mostly uses the standard Cocoa controls. But underneath, just about any GUI application written for MacOS X will use the run loops, responder chain, and view hierarchy that Cocoa provide. The main exceptions would be applications that are built mostly using an alternate framework like OpenGL or WebKit.
Figure out what, specifically, the Steam application does that you'd like to do. Take a look at the tools that Cocoa provides to see if you can figure it out yourself; if not, ask about it here.

Scripting languages in XCode

I notice that Java has a number of ancillary scripting languages. Clojure and Groovy for example. My understanding is that these can be used when the full might and power of Java does not need to be applied and a speedy cludge can be hacked in Groovy/Clojure. But at the end of the day the scripting tools contribution gets compiled into the application
Question 1. Is there a similar scripting in XCode? I was not so interested in Python or Ruby in this situation as they are languages in their own right added in, as indeed I think can happen in Java, but I was looking for a purpose built tools.
Question 2. If there is such a tool would it count the application out vis-a-vis the new Apple guidelines as to what can be used to generate iXxx apps?
F-Script is a scripting language that integrates well with Objective-C/Cocoa applications. Might not be exactly what you're looking for, but it's worth a look.
For such things there is AppleScript, with its own IDE AppleScript Studio. It has bindings to control Cocoa Applications, be embedded inside of them or even work as stand-alone scripts.
The problem is that it cannot be integrated inside iXxx applications because iPhone-OS Cocoa Foundation framework doesn't include it.
As mentioned by mipadi, you can use F-Script for Cocoa applicaitons.
If you are staying mainly in C, then Lua is another option.

What languages have a good GUI API/Designer? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I've been wanting to become proficient in a new language for a while. There are a few languages I want to learn but it's pretty important for me to be able to create a (Application) GUI. I work in C# so I have become very accustom to the GUI designer.
I would love to get better with C++ or Java (both of which I have a small amount of experience with). Other languages could be interesting too. I just really need to be able to make a GUI reasonably easily.
So what (non .net) language has a really good method of designing GUIs?
An extension to this question might be what are the most common GUI APIs/designers?
I would recommend you to look at Delphi. It's object pascal with a nice IDE and a nice community!
Take a look at www.codegear.com
CodeGear have also a C++ IDE, so you can have the bundle and put your hand dirty at Delphi and C++!
Hope his helps
vIceBerg
I agree with pmlarocque in that you should use NetBeans if using Java. It really makes GUI design easy.
As an aside, I also recommend pencil and paper. That really has helped me throughout the years, start making sketches of what you want it to be then replicate it in the IDE.
For GUI in C++ you should look C++ Builder, you can get Turbo C++ Explorer for free
I use both Visual Studio and Delphi, and the Delphi GUI editor is significantly better. It is worth a try. They make a free version.
May I recommend Flex? Flex Builder has a really nice GUI designer.
As for Java, both NetBeans and Eclipse IDEs are good choices.
To design GUIs in Java, you can use SWT, AWT or Swing widget toolkits.
I heard that some people experienced problems with SWT projects running on NetBeans. However, NetBeans comes with a built-in GUI Builder for Swing , a very powerful widget toolkit.
Of course, there's also a plug-in for Eclipse that allows you to build Swing GUIs, so it basically comes down to which IDE you prefer...
NetBeans has a great Swing GUI Builder (formerly Project Matisse). This is for Java, I think it was started by Sun but is an open source project. Very similar to Eclipse, but I found an advantage with NetBeans due to this GUI builder.
Check it out at: http://www.netbeans.org/features/java/swing.html
The cross-platform Qt GUI framework (which is mainly for C++) comes with Qt Designer.
Interface Builder and Qt Designer are by far the best GUI design tools I've ever used.
WPF/Silverlight: Expression Blend
Not as big as it used to be, but Powerbuilder.
Visual Dataflex has a decent GUI editor. It's a nice solution for building "database-agnostic" database applications.
Use Microsoft Expression Blend to layout your GUI.
WPF...
Before, I was using Qt Designer. First time I started using Expression Blend, I fell in love with it. So much easier to use than Qt Designer.
If your app requires high-performance, back-end it with some native-code language like C++.
If not, just stick with C# or Python.
Remember it's not just the tool that you use, but how it works as a whole
Too many combinations of different languages/vendors sometimes just makes you want to pull your hair our!
Well, I have two options: Objective-C on the Mac using Cocoa GUI framework, or Java for everything (Mac, Linux, MS-Windows) using the Swing API.
If you want to program in Objective-C targeting Mac OS X operating system for Apple Macintosh, iPhone, or iPod Touch - then the Interface Builder that comes bundled with the Xcode IDE (part of the Developer bundle) is really good.
You will need a Mac, of course, to be able to use it. If you have a Linux or Windows PC already, then you probably have a monitor, USB mouse, and USB keyboard. So you could get an Mac Mini for $599 and hook those up to it.
The Developer bundle is free. Just go to developer.apple.com and sign up for free Developer tools once you get your Mac.
If you are going to be a professional developer, then you might want to go there before you get your Macintosh and see if registering as a Pro and buying a Macintosh and stuff under that deal would net you more bang for your buck.
This Interface Builder of Apple's is pretty famous. It is what gave the NeXT computer is high reputation for being the way to create applications really fast. Wall Street financial firms, government agencies, and research types - plus a fair number of 3rd party commercial software developers - used it to create GUI applications very rapidly.
The name of Apple's Cocoa framework, by the way, used to be Next Step. When Apple bough NeXT from Steve Jobs, they renamed Next Step Cocoa. However, the classes still begin with NS as a little artifact of their heritage.
What people like about Interface Builder is that it has a very good layout manager and it lets you "wire" UI objects to other objects, making the latter "targets". Wiring them together this way creates a "connection".
So far this sounds very unexciting, I know. However, it gets exciting when you start doing it. You can design your actual runnable GUI in the designer and actually run it before you have written any code. Writing code lets you incrementally flesh out the user interface that have behavior more than UI stimulus-response behavior.
Anyway, the idea is that you can bang out a prototype extremely quickly, get feedback from someone based on this concrete GUI - and then fill in the details with Objective-C programming.
The most famous thing that was ever created with Next Step (Cocoa) is the World Wide Web (WWW). You may have heard of it. Well, the first web browser in the world was created by Tim Berniers-Lee at CERN in 1989 using Next Step, which had just come out the year before (1988).
He said he liked Next Step because it let him create his web browser very quickly. Even more impressively, his web browser not only allowed users to view web pages - his browsre also let users edit the web pages they viewed.
If you want to program in Java, NetBeans has a very nice Swing GUI designer.
It comes built into NetBeans. The GUI designer very easy to use and seems to have a full set of capabilities. My ownly dislike is that it puts commented sections in the code that you cannot edit. JBuilder did not put those annoying comments/restrictions in but JBuilder has pretty much faded from the scene these days.
Another downside of NetBeans is that it creates a .form file with the same name as the GUI class you are editing. Java code refactoring tools, other than NetBeans, are not going to know about this file. So, if you manually move the package the class is part of (or rename the class) - or use Eclipse or some other program to do it - you are going to have problems. You will need to be sure to use NetBeans to move/rename your class.
Eclipse had one in the form of an experimental plugin that was an okay start for a GUI designer called VE (Visual Editor) a number of years back. However, VE does not appear to have been updated in a couple of years.
I really like the true portability of Java programs. Java programs with GUIs are no exception.
I recommend adopting Java as your new language and using NetBeans as your first IDE, since you favor GUI program designs with a WYSIWYG editor.
Later, I suggest you also learn Eclipse. That way you will benefit from its more powerful code editing/refactoring capabilities.
You do not have to make an either-or choice between the two IDEs. With some caveats, like I have given - you can use both.
Netbeans IDE for Java as a sweet GUI designer.
Java Netbeans is good, and since java is fairly close to c# in syntax, it might make an easy learning experience
wxGlade is a GUI designer that can generate Python, C++, Perl, or Lisp and uses the wxWidgets library. And it's free.
IntelliJ IDEA for Java
http://www.jetbrains.com/idea/features/gui_builder.html
Here's a video:
http://www.javalobby.org/eps/intellij_ui_designer/
Vaadin
You can write business-oriented desktop-style web apps using only Java on the server side yet rendered automatically using Web standards client-side in the web browser.
The Vaadin Framework provides the magic of letting you define your desired fields, labels, buttons, and other widgets in a layout all using pure Java. By harnassing GWT technology, Vaadin transforms your Java code at runtime into the content for display in a user’s web browser. Your app is rendered using all the Web goodness of HTTP, HTTP/2, HTML, HTML5, CSS, DOM, JavaScript, WebSocket, Push, and so on… but does so transparently to the Java programmer. All that transformation is done under the covers. As a Vaadin programmer, all I deal with is Java coding.
I prefer using the well-documented API to programmatically layout the contents of my forms and widgets for the user-interface. You can do so free-of-cost using the open-source framework.
Alternatively, you can use their commercial product Vaadin Designer for a visual drag-and-drop layout editor tool.
Try the live Sampler and other demos such as Reindeer demo.
Since you mentioned you use C++, I'd recommend MatDeck(https://labdeck.com/comparison/). They offer a GUI Designer in their unique code. Their code is based on C++(It's called MatDeck C++ style code) and since it's specialized to their software it needs a lot less code to run. They offer much more and are a fully-fledged software. They also have a whole page that compares their code(https://labdeck.com/python/c-style-script/).

Resources