text stringlengths 0 1.17k |
|---|
[2012.56 --> 2017.32] but that's hilarious yeah it's a very modular approach now this interesting design is that is |
[2017.32 --> 2021.90] that kind of like to speak true you know to kind of capture the heart of the node community so that |
[2021.90 --> 2026.46] people can pick the modules as they want and kind of mix and match what they want for their different |
[2026.46 --> 2033.10] configuration so i i'm a big believer in uh expansion contraction pattern of development |
[2033.10 --> 2039.74] where you add features to your main uh main framework to the core of the framework and then |
[2039.74 --> 2045.34] as they mature as as you gain some experience of how they work you figure out if they should be |
[2045.34 --> 2051.00] abstracted out into their own uh sub module or if they should stay part of the core system you're |
[2051.00 --> 2055.42] still keeping the same integrated experience overall but uh in terms of code organization you're still |
[2055.42 --> 2062.60] breaking it up so right um but uh i would argue that uh so so happy itself uh the the just a happy |
[2062.60 --> 2070.06] module it's a pretty heavy framework so i won't try to portray it as a lightweight modular solution um |
[2070.06 --> 2078.56] it's taking a very opinionated hands-on approach to to um writing an http uh web server or api server |
[2078.56 --> 2084.98] and the reason for that is that we really want to integrate solution where when you define a route you |
[2084.98 --> 2089.52] can define the caching policy all in one place you can define your authentication you can define your |
[2089.52 --> 2096.94] your uh input validation and and everything just works out of the box you don't have to then start |
[2096.94 --> 2102.60] basically finding the right plugin to do this and the plugin to do that everything we we deemed as |
[2102.60 --> 2110.34] absolutely necessary for building any kind of modern uh web application is built in and and so so that's |
[2110.34 --> 2116.50] that's a core uh uh principle there what we've done though is um whatever we we consider to be |
[2116.50 --> 2125.86] uh more of a of an optional component for example um there's a very popular um um express uh middleware |
[2125.86 --> 2131.58] called um passport that basically everybody's using for all their third-party authentication so we |
[2131.58 --> 2137.26] created a wrapper for that uh and and that's called travel log and so that's not part of core it's part |
[2137.26 --> 2142.64] of uh it's a heavy plugin you can add in the other thing is is that uh we designed a plugin system |
[2142.64 --> 2149.00] to basically avoid all the middleware hell that that we've experienced before so you can actually |
[2149.00 --> 2154.06] describe relationship between plugins one one plugin can actually say i require another one to work |
[2154.06 --> 2160.84] uh a plugin can actually be very specific into the order of execution to say hey first go run this uh |
[2160.84 --> 2166.92] um csrf plugin and then only then run the cookie one or the other way around depending on what you need |
[2166.92 --> 2172.06] and so uh when you're loading them you don't have to worry about the order in which you're loading them |
[2172.06 --> 2177.48] um as long as they describe the the relationship they will the happy loader will make sure that it's |
[2177.48 --> 2182.98] uh done in the right order based on how it's been prescribed so so we've done a lot of that stuff um |
[2182.98 --> 2189.62] we're we're trying to avoid as much as possible uh so we're discouraging people from building |
[2189.62 --> 2196.64] new happy specific plugins as much as possible so like a lot of people are creating these plugins and |
[2196.64 --> 2200.30] they're all very disappointed when they're like they're showing it to me and i was like why is it |
[2200.30 --> 2206.96] the plugin like why is it not just a regular node module that you use um there is this excitement of |
[2206.96 --> 2212.02] you know like getting a putting a stake in the ground and saying i created the you know the happy plugin |
[2212.02 --> 2220.10] for this yeah um but in practice it's not necessary so uh we look at plugins as basically um something |
[2220.10 --> 2224.16] that is directly interacting with the framework that's directly adding functionality to the framework |
[2224.16 --> 2230.48] uh that is defining routes um if if you if all you want to do is uh you know parse a multi-form |
[2230.48 --> 2237.28] uh you know response or request uh i would say don't build a plugin for that just just write a module |
[2237.28 --> 2244.22] right yeah it's a different way of viewing it i guess people kind of it's a i don't know what the |
[2244.22 --> 2250.50] what the mindset is right but uh let's say you know like go right it's a pretty early adoption stage |
[2250.50 --> 2257.54] for for the program language of go and so people love to um write like the port of another solution |
[2257.54 --> 2263.90] for that thing right so people say oh if they're using um you know let's say you didn't have your |
[2263.90 --> 2268.44] your passport wrapper for for happy then they would say well people use passport for express i want to |
[2268.44 --> 2274.42] write the passport for for happy and i think it causes some fragmentation in the community right |
[2274.42 --> 2279.38] because it it i you know you can talk a long time about what the motivations behind that |
[2279.38 --> 2284.34] kind of looking for like some sort of fame or or whatever but at the same time like they want to |
[2284.34 --> 2289.92] help the community by providing a solution so i think node and npm specifically kind of kind of |
[2289.92 --> 2294.34] makes it pretty simple right to just use npm modules in general and so perhaps you're right that it makes |
[2294.34 --> 2299.48] more sense to to write a module that um you know is easier to manage in that way than than trying to do |
[2299.48 --> 2304.94] a specific plugin for happy yeah and and the other thing is that uh really all you need in order to |
[2304.94 --> 2312.14] create a happy plugin is to export export one function called register and so that's all that's |
[2312.14 --> 2317.84] all we're looking for when we're loading a plugin so um but you know if if you're writing a module and |
[2317.84 --> 2324.58] you really want it to be easily um absorbed into the happy ecosystem then you know write your plugin |
[2324.58 --> 2329.62] write your module the way you would write it for anybody to use and then just add one more exported |
[2329.62 --> 2337.12] function um so it so it can also work as a um as a plugin for happy and i would argue that you know |
[2337.12 --> 2341.82] if you're doing that might as well you know export one more function and then it can also work as a |
[2341.82 --> 2346.88] uh as a middleware for express uh if you know if you design it properly then then it should be pretty |
[2346.88 --> 2352.60] easy to uh to bridge the two um for most of the the the basic stuff that people are looking for |
[2352.60 --> 2359.86] let's pause for a minute and give a shout out to our sponsor fresh books now we've been using fresh |
[2359.86 --> 2366.12] books literally for years and years and years i gotta say probably as far back i can remember |
[2366.12 --> 2375.32] using fresh books is like 2007 2008 maybe but they're a staple in our business and what we do we |
[2375.32 --> 2381.70] would literally be lost if we didn't have fresh books to use for our invoice management we absolutely |
[2381.70 --> 2390.08] hands down red-faced love fresh books absolutely so just in case you didn't know we love fresh books |
[2390.08 --> 2395.96] but if you're the kind of person who's still sending your your invoices with word or excel and |
[2395.96 --> 2400.64] maybe you've kind of got your receipts kind of shoved into a shoebox kind of keeping track of your |
[2400.64 --> 2406.28] expenses there and just kind of hoping things will work out well with fresh books you can easily do all |
[2406.28 --> 2411.20] of that you can create invoices online you can capture and track uh capture and track expenses on the go |
[2411.20 --> 2417.94] you can get real-time business reports with a few simple clicks it's super super easy perfect for any |
[2417.94 --> 2423.68] large or small business we absolutely love it and we want you to try it today for free you can sign up |
[2423.68 --> 2429.52] today at get fresh books.com and here's the delicious part that fresh books is doing for our listeners |
[2429.52 --> 2435.26] every day they're giving away a birthday cake that's right a birthday cake to someone who signs up for a |
[2435.26 --> 2439.82] new account from this show so for your chance to win enter the changelog in the show in the uh |
[2439.82 --> 2444.68] and how did you hear about a section when you sign up for a new account and just know that with |
[2444.68 --> 2452.88] fresh books every day could be your birthday so go sign up at get fresh books.com so when was 1.0 |
[2452.88 --> 2457.60] of happy released or i guess a better question i'm not sure what your versioning structure looks like |
[2457.60 --> 2465.08] when was happy production ready released uh well it was in production before 1.0 but um |
[2465.08 --> 2473.14] we uh so we're using the numbers to basically it's just a regular stammer contract of uh of you know |
[2473.14 --> 2478.64] a patch is just a bug fix that's backward and forward compatible and then uh minor is uh backward |
[2478.64 --> 2487.08] compatible and major is not backward compatible uh and so 1.0 came out i think in april uh we um |
[2487.08 --> 2494.38] we got it out right together with the node uh dot 10 release and that has been used in production for |
[2494.38 --> 2505.70] uh um since then and uh we're working on um 2.0 um right now uh hoping to ship it out next week and |
[2505.70 --> 2513.92] there are really no major uh changes in it it's just that um it's been long enough that we've uh |
[2513.92 --> 2520.44] accumulated uh a little too much uh backup compatibility crap around it um we've you know |
[2520.44 --> 2525.08] as as we've been using it as people have been using it we got a lot of feedback and a lot of |
[2525.08 --> 2530.18] the decisions we made you know in april were no longer valid uh in in september all of a sudden |
[2530.18 --> 2535.02] we're like oh we really don't want this configuration value to be in the same node as this configuration |
[2535.02 --> 2541.22] value because it doesn't it doesn't work right when you're trying to use defaults and so we made |
[2541.22 --> 2546.72] back compatible changes but it got to the point now where uh it's it's kind of time to clean it up |
[2546.72 --> 2554.02] and and do a breaking release so it's a very non-dramatic 2.0 yeah it was interesting um i was |
[2554.02 --> 2559.34] watching i don't know what video it was but uh like a tutorial happy video that you all put on and |
[2559.34 --> 2565.52] and i just noticed somebody was you know adding uh adding routes adding handlers with the route method |
[2565.52 --> 2569.96] on the server and then i saw in the documentation that there was the add route method and so i was like |
[2569.96 --> 2575.10] i wonder where you know something's wrong or you know in my head i was like i bet there's a major |
[2575.10 --> 2579.42] change coming out that that's like breaking you know that's either deprecating this or breaking it |
[2579.42 --> 2584.62] or something and it was interesting to me that that you all have a issue open for 2.0 breaking |
[2584.62 --> 2589.90] changes that's a neat way to do it and uh it was pretty um you know simple for me to figure out what |
[2589.90 --> 2595.94] was going on and why i saw the kind of discrepancy between the two so um how how much you know i guess |
[2595.94 --> 2604.16] my question is how how actively is your you know issues are your issues on the on the project watched |
[2604.16 --> 2608.76] like what do most people know that these breaking changes are coming that are using happy or or you |
[2608.76 --> 2613.10] know i guess that's the an awkward way to say basically but how much activity have you guys |
[2613.10 --> 2620.18] had around like the open source issues kind of pull requests kind of a thing um so there's a couple |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.