Giter Site home page Giter Site logo

yousafgill / posh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vvvv/posh

0.0 2.0 0.0 1.13 MB

A flat-ui framework for c#/.net application using SVG targeting browsers

License: MIT License

C# 76.08% CSS 1.20% JavaScript 20.75% HTML 1.98%

posh's Introduction

#Posh misusing the browser as your windowing/interaction/drawing layer for your c#/.net desktop applications by streaming [SVG] (http://en.wikipedia.org/wiki/Scalable_Vector_Graphics) graphics via the [WAMP] (http://wamp.ws/) v1 protocol to browsers. For some more details read the [announcement] (http://vvvv.org/blog/posh-an-svg-based-flat-ui-framework-targeting-browsers).

##Applications using Posh

##Running the Demo

  • Open Demo.WinForms\PoshDemo.sln
  • Rightclick the solution icon -> Restore Packages
  • Now it should build and run

##Code Overview comes with

WebServer.cs

  • is an HTTP server
  • serves the \web\posh.html as answer to any URL request only with a unique WebSocket port configured for each URL
  • on /root it serves a listing of all saved *.xml documents

PoshServer.cs

  • has a WebSocket listening on the specified port
  • translates RPCs that come in via WebSocket to local calls
  • registers a WAMPListener on the WebSocket
  • registers Posh topics (pub/sub) on WAMP (Add, Update, Remove)
  • publishes Posh RPCs (Dump, SetSessionName, KeyDown, KeyUp, KeyPress)
  • has an SvgEventCaller
  • handles a RemoteContext per Session
  • can publish Posh after every RPC (AutoPublish) or manually on Publish()

RemoteContext.cs

  • acts as kind of a buffer between changes to the local and the remote SVG DOM
  • keeps track of local DOM changes
  • provides them in Posh form (json/xml) on demand

SvgIdManager.cs

  • is a custom ID manager for SVG
  • gets SvgEventCaller from WampServer
  • OnAdd(element)
  • adds the element to the RemoteContext
  • calls element.RegisterEvents() on the element handing it the SvgEventCaller
  • registers itself on element.AttributeChanged so it can reflect those changes on the RemoteContext
  • OnDelete(element)
  • calls element.UnregisterEvents()

DynamicRPC.cs

  • represents a dynamic RPC for being able to be registered at the WampHost

###/web the web/js part of posh that

  • receives Posh snippets and
  • manipulates the SVG DOM accordingly
  • registers RPCs as eventhandler
  • calls eventhandler

posh's People

Contributors

joreg avatar tebjan avatar gregsn avatar

Watchers

James Cloos avatar Yousaf Gill 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.