[{"data":1,"prerenderedAt":341},["ShallowReactive",2],{"project-15461000":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":43,"post_text":45,"what":46,"said":80,"maker_in_thread":193,"shape":201,"grid":205,"attempts":302,"same_week":303,"maker_shows":33,"maker_hidden":333,"reader_version":334,"card":335},"15461000","Vue-Model","Models with HTTP Actions for Vue.js","title","Show HN: Vue-Model – Models with HTTP Actions for Vue.js","https:\u002F\u002Fgithub.com\u002Faarondfrancis\u002Fvue-model","github.com","aarondf",1507839732,2017,109,44,411,2242,19,"notable","languages","frontend javascript library","library",[24,25,26,27,28],"vue.js","rest api","http models","crud","frontend state","mixed",-0.071,{"positive":32,"neutral":33,"mixed":34,"critical":35},3,6,1,7,17,{"idea":38,"performance":40,"design":42},{"positive":39,"critical":34},2,{"positive":41,"critical":41},0,{"positive":34,"critical":33},[44,41,41,41,41,41,41,41,41,41,32,41,32,32,41,41,44,32,41,34,34,41,41,41,41,32,41,34,41,32,41,34,34,41,34,41,41,41,32,32],5,null,{"problem":47,"audience":57,"pricing":45,"motivation":64,"time_to_build":45,"stack":68,"openness":77,"stage":78,"team_size":79},{"value":48,"source":49,"evidence":50},"Removes boilerplate save, fetch, validation error and loading state code for REST resources in Vue apps","maker",[51,54],{"id":52,"by":11,"text":53},"15462399","> Can you explain why I'm stupid and everything I've done is wrong? Haha I cannot, because you probably aren't stupid and haven't done everything wrong. The thing I like about…",{"id":55,"by":11,"text":56},"15461601","No, I probably wouldn't say that this replaces Vuex. I don't use Vuex, I find it to be more complex than I need. I build a lot of CRUDdy apps that are pretty straightforward, so…",{"value":58,"source":49,"evidence":59},"Vue.js developers building CRUD apps against REST backends",[60,63],{"id":61,"by":11,"text":62},"15461627","Thanks for saying that. It sounds like you and I are quite similar. I've never built a full SPA because I it's _so_ much easier and faster for me to build \"traditional\" apps.…",{"id":55,"by":11,"text":56},{"value":65,"source":49,"evidence":66},"Wanted something simple to interact with Laravel backends for CRUD-heavy work",[67],{"id":61,"by":11,"text":62},[69,73],{"value":70,"source":49,"evidence":71},"Vue.js",[72],{"id":55,"by":11,"text":56},{"value":74,"source":49,"evidence":75},"axios",[76],{"id":55,"by":11,"text":56},"open_source","launched","solo",{"praise":81,"objections":97,"requests":125,"questions":145,"alternatives":159},[82,90],{"value":83,"source":84,"evidence":85},"Simple, elegant model layer that fills a gap for SPA developers","commenter",[86],{"id":87,"by":88,"text":89},"15461607","davidscolgan","I'm usually a Django backend developer doing the whole server-rendered static html type sites, but I've attempted to venture into the world of single page apps a few times. The…",{"value":91,"source":84,"evidence":92},"Familiar to backend developers",[93],{"id":94,"by":95,"text":96},"15463226","tudorconstantin","As a backend developer let me tell you this looks so familiar. This is a good thing because the frontend MVCs did quite clicked for me yet.",[98,108,115],{"value":99,"source":84,"evidence":100},"Unsaved edits persist in global model state; needs form handling",[101,105],{"id":102,"by":103,"text":104},"15461471","IgorPartola","But how do I know when to fetch? With my approach global state is not modified until the user explicitly does it. Modifying customer.name and not saving it will persist until the…",{"id":106,"by":103,"text":107},"15461948","In my apps customer will be a global via VueX. If I go to the Edit Customer view, change customer.name, but don’t save, the change will be visible throughout the rest of the app:…",{"value":109,"source":84,"evidence":110},"Naming conflicts with existing 'vue model' name",[111],{"id":112,"by":113,"text":114},"15464029","28inch","I like it but the naming is rather weird. 'vue model' is heavily used in the vueniverse.",{"value":116,"source":84,"evidence":117},"Violates single responsibility principle per critics",[118,122],{"id":119,"by":120,"text":121},"15466631","lucisferre","There are many better ways to manage front end state that don't actively encourage violating SOLID principles, SRP and OCP in particular. Obviously no one cares about SOLID…",{"id":123,"by":120,"text":124},"15466634","You happily embrace violations of single responsibility?",[126,134,138],{"value":127,"source":84,"evidence":128},"Add form handling and reset support",[129,130],{"id":106,"by":103,"text":107},{"id":131,"by":132,"text":133},"15464838","DanitaBaires","> And if I go to the edit view, make changes, then exit without saving, then go back, the view should be reset. This is business logic and it's dependent of the UI. If you have a…",{"value":135,"source":84,"evidence":136},"Add WebSocket updates from the server",[137],{"id":106,"by":103,"text":107},{"value":139,"source":84,"evidence":140},"Support repository pattern",[141],{"id":142,"by":143,"text":144},"15463245","archseer","I like this, but I feel that a repository pattern would be better suited (Repo.update(model) vs model.update(), model being ).",[146,153],{"value":147,"source":84,"evidence":148},"Is it production-ready or a toy project?",[149],{"id":150,"by":151,"text":152},"15463302","enraged_camel","Nice. Will give it a whirl in my next project. Question for the author: is this \"production-ready\", or is it a toy project? If I start using this, do I have to worry about you…",{"value":154,"source":84,"evidence":155},"What happens when fields change without saving?",[156],{"id":157,"by":103,"text":158},"15461435","What exactly happens when the user modifies the field customer.name but doesn’t hit save\u002Ftrigger customer.http.update()? I usually resolve this by mirroring customer.name to…",[160,168,179,186],{"value":161,"source":84,"evidence":162},"Vuex",[163,167],{"id":164,"by":165,"text":166},"15461567","ElatedOwl","Neat! Is this meant to replace Vuex \u002F some other store?",{"id":61,"by":11,"text":62},{"value":169,"source":84,"evidence":170},"Ember",[171,175],{"id":172,"by":173,"text":174},"15462514","Rifu","If you’re looking for something more Django flavored for your spa, there’s always Ember[0] [0] https:\u002F\u002Femberjs.com\u002F",{"id":176,"by":177,"text":178},"15462517","drspacemonkey","You might wanna look into EmberCLI. It's not as trendy or popular as Vue or React (rendering speed is a big reason), but it might be what you're looking for.",{"value":180,"source":84,"evidence":181},"Feathers.js",[182],{"id":183,"by":184,"text":185},"15464011","softwarelimits","@author: please take a look at http:\u002F\u002Ffeathersjs.com - your work is very interesting, but you should make it a layer on top of a modular backend service and feathers would be a…",{"value":187,"source":84,"evidence":188},"Laravel Spark",[189],{"id":190,"by":191,"text":192},"15464074","hellovue","Laravel Spark has similar functionality without the need for a plugin which makes it more reusable. https:\u002F\u002Fspark.laravel.com\u002Fdocs\u002F4.0\u002Fforms",{"comments":194,"answered":44,"key":195},10,[196,197,198],{"id":61,"text":62},{"id":52,"text":53},{"id":199,"text":200},"15466026","Neither of these things look like directions I want to go in. Thanks for the suggestions though!",{"commenters":202,"max_depth":35,"maker_replies":194,"first_comment_mins":203,"lifespan_hours":204},23,61,27,[206,208,210,214,216,219,221,223,225,226,230,233,237,239,242,243,245,246,247,250,252,254,257,258,260,262,264,267,269,271,272,273,276,278,279,282,284,286,287,289,291,294,297,301],[87,41,44,207,88,41],"project\u002Fpositive\u002Fidea",[61,41,41,209,11,34],"maker\u002Fpositive\u002Fidea",[211,41,41,212,213,41],"15461680","commenter\u002Fneutral\u002Fnone","rlander",[215,41,41,212,88,41],"15461826",[217,41,41,212,218,41],"15463508","erik14th",[220,41,41,212,88,41],"15464983",[222,41,41,212,213,41],"15467795",[172,41,41,224,173,41],"other\u002Fneutral\u002Fnone",[176,41,41,224,177,41],[227,41,41,228,229,41],"15463840","other\u002Fneutral\u002Fidea","kostarelo",[231,41,41,228,232,41],"15464652","vog",[234,34,32,235,236,41],"15462263","project\u002Fneutral\u002Fidea","Zenbit_UX",[52,34,41,238,11,34],"maker\u002Fneutral\u002Fidea",[240,34,32,241,236,41],"15465305","project\u002Fmixed\u002Fperformance",[183,39,32,238,184,41],[244,39,41,224,184,41],"15464435",[199,39,41,238,11,34],[94,32,44,207,95,41],[157,248,32,249,103,41],4,"project\u002Fneutral\u002Fdesign",[251,248,41,249,11,34],"15461457",[102,248,34,253,103,41],"project\u002Fcritical\u002Fdesign",[255,248,41,256,11,34],"15461502","maker\u002Fneutral\u002Fdesign",[106,248,34,253,103,41],[131,248,41,259,132,41],"commenter\u002Fcritical\u002Fdesign",[261,248,41,259,103,41],"15465175",[263,248,41,256,11,34],"15461959",[265,248,41,266,184,41],"15464457","commenter\u002Fneutral\u002Fdesign",[150,44,32,268,151,41],"maker\u002Fneutral\u002Fnone",[270,44,41,268,11,34],"15465420",[142,33,34,253,143,41],[190,35,41,228,191,41],[274,35,41,224,275,41],"15464102","s4vi0r",[164,277,32,235,165,41],8,[55,277,41,238,11,34],[112,280,34,281,113,41],9,"project\u002Fcritical\u002Fidea",[283,194,34,253,120,41],"15462589",[285,194,41,268,11,34],"15463035",[119,194,34,253,120,41],[288,194,41,268,11,34],"15466773",[290,194,41,212,120,41],"15468227",[292,194,41,212,293,41],"15469752","Can_Not",[295,194,32,249,296,41],"15468561","aculver",[298,194,44,299,300,41],"15463694","project\u002Fpositive\u002Fdesign","yxhuvud",[123,194,34,253,120,41],[],[304,309,314,319,324,328],{"id":305,"name":306,"points":307,"category":308},"15492248","Metaballs",673,"creative",{"id":310,"name":311,"points":312,"category":313},"15466817","CoinMall Alpha",156,"finance_crypto",{"id":315,"name":316,"points":317,"category":318},"15484390","FaxRocket",152,"productivity",{"id":320,"name":321,"points":322,"category":323},"15489535","BOOLR",136,"learning_science",{"id":325,"name":326,"points":327,"category":318},"15494655","Writing",133,{"id":329,"name":330,"points":331,"category":332},"15481298","libsignal-node",88,"security_privacy",false,"v2",{"id":336,"name":5,"line":6,"ai":333,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":337,"top":18,"kw":338,"maker":11,"domain":10,"tier":19,"attempts":41,"strip":339,"url":9,"mix":340,"praise":83,"objection":99,"sub":21},15461000,-0.07,[24,25,26,27,28],"5000000000303300530110000301030110100033",[32,33,34,35],1794036559747]