Coder Social home page Coder Social logo

qskit's Introduction

Q Branch Standard Kit

by Q Branch

Low-level code with tests

QSKit is a collection of categories and utilities that we use in our software. The project includes unit tests so we can build on a solid foundation.

None of it is high-tech. It’s just some basics, our standard kit.

Not a framework

Any given app may not need everything, and so we don’t build it as a framework. Instead, an app uses exactly what’s needed. (But note that some things may depend on other things.)

What’s in it

Categories

Category methods are prefixed with qs_. This isn’t beautiful, but it does mean our methods won’t collide with Apple’s methods, and it makes it easier to spot category methods.

Many of the categories for collections are for adding or getting objects safely — that is, they won’t throw an exception if a key is nil (for instance).

But there are a bunch of other categories too — -[NSData qs_hexadecimalString] and -[NSNotificationCenter qs_postNotificationNameOnMainThread:object:userInfo:] are examples.

QSIsEmpty

Often you don’t care about the difference between nil and just not containing anything — an empty NSString, an NSArray with zero elements, and so on.

QSIsEmpty works with strings, collections, and NSData. It’s convenient, and it makes it clear when you don’t care about that difference.

Other things

QSSAXParser wraps libxml’s SAX parser. (There’s a QSOPMLParser to help you figure out how to use it.)

QSBlocks contains some commonly-used block definitions.

QSPlatform includes #defines to make writing cross-platform (iOS and Mac) easier.

QSMath has functions that work with 32-bit and 64-bit CGFloats.

QSNode is a tree representation.

QSDateParser is a fast parser for internet dates.

QSImageRenderer is a block-based system for rendering images in the background.

QSScaling does the math for scaling images (aspect-fit or aspect-fill).

QSDatabaseQueue works with FMDB. (FMDB is available separately from Flying Meat.)

QSHTTPConstants and friends in the Web group are some of the building blocks for building web services clients.

How to test

Xcode’s test system wants an app, so there’s a Mac app included. It doesn’t do anything.

Open the project and choose Product > Test (or hit cmd-U) to run the tests.

Future

We’ll keep adding to QSKit. The kit is forever a work in progress.

Contact

Brent Simmons
@brentsimmons

License

Q Branch Standard Kit is available under the MIT license. See the LICENSE file for details.

If you use any or all of QSKit in an app, please let us know — we’d like to see your app.

qskit's People

Contributors

brentsimmons avatar padraigk avatar andrewsardone avatar ccll1 avatar mafv avatar harukizaemon avatar

Watchers

James Cloos avatar SilenceZhou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.